Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update commit-msg #45

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

ryantfowler
Copy link

I've provided a simpler approach to running grumphp inside a docker container. I've provided details to the project itself, for others to see here. I'm sharing this knowledge back with your project, as reviewing how you got it working helped me out.

I've provided a simpler approach to running grumphp inside a docker container. I've provided details to the project itself, for others to see here: phpro/grumphp#618 (comment). I'm sharing this knowledge back with your project, as reviewing how you got it working helped me out.
Corrected command from pre-commit to commit-msg
'cd "${HOOK_EXEC_PATH}" && cat "/tmp/${DIFF_FILE}" | ${HOOK_COMMAND} --git-user="${GIT_USER}" --git-email="${GIT_EMAIL}" "${COMMIT_MSG_FILE}"'
GRUMPHP_EXIT_CODE=$?
(cd "./" && echo "${DIFF}" | \
exec 'docker' 'run' '--rm' '-t' "--volume=$PWD:${HOOK_EXEC_PATH}" "${DOCKER_PHP_CONTAINER_ID}" \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ryantfowler this one is also failing for the same reason as #44:

docker: Error: No such image: 62a2c063b218ae30c8f8656487771e158671b5d5390791ac578341649d9eb662.
See 'docker run --help'.

I think that docker run expects an image identifier instead of a container id: "${DOCKER_PHP_CONTAINER_ID}"

Updated the file to reflect correct command. Also, there's this phpro/grumphp#621 coming up
@ryantfowler
Copy link
Author

@danielozano I've updated the PR, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants