Closed shelane closed 4 years ago
Curious, are you by chance using a application such as Source Tree for Git? I have this issue pretty commonly, and it's to do with the way PHP versions are parsing code in Source tree (vs. if you do a commit directly in the command line).
I am using SourceTree.
It actually looked like it was failing at:
[ExecStack] Running composer validate --no-check-all --ansi in *****
sh: composer: command not found
which the **** is my git remote location.
i would suggest trying to run the same command directly from your command line and see if it works there vs. in source tree. that's the behavior i see. it's actually "fine" from the terminal in my case, but something about the php version in source tree fails (every time).
@shelane Also keep in mind if you are using your default BLT git hooks, they are executing on the host git client (not git in the container) if using a GUI like SourceTree or Fork. You will need to override BLT's git hooks with your own copies that do effectively the same thing, but each hook runs its checks using container resources. I do this in my Metis project with Docksal:
blt.yml override specifying each hook should be installed from custom scripts stored in blt/scripts/git-hooks: https://github.com/lpeabody/Metis/blob/develop/blt/blt.yml#L30
Custom hook files https://github.com/lpeabody/Metis/tree/develop/blt/scripts/git-hooks
With that configuration and those files, when blt setup
runs it installs the git hooks I've created (which include logic for getting the same results but executed with fin exec
) instead of BLT's default git hooks.
Thanks @lpeabody , but it still has an issue in SourceTree. It now says fin command not found.
Do you have Composer installed on the host machine? What happens when you run composer
from the host (ignoring BLT for the moment)?
Composer must be properly configured on any environment touching BLT, including the host machine if you are working on a VM. I don't know that that can change. If you don't want to use Composer on the host, you'll need to disable the Git hooks.
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.
I want to... Commit and push composer.json and composer.lock files.
It's not working because... Git commits and git push (as of 11.4.0) fail when checking composer on host machine when local machine only has composer inside of docker container.
Detailed error output
BLT doctor output
System information
Current work around: disabled git hooks pre-push and bypass git commit hooks when committing composer files.