VilnaCRM-Org / user-service

Creative Commons Zero v1.0 Universal
8 stars 1 forks source link

Cannot make commit after `make start` command #38

Closed paaneko closed 4 months ago

paaneko commented 4 months ago

Description

After running make start command, developers are prevented from making commits. However, commits work fine in a clean project that was just cloned. The issue persists even after running the make down command.

Steps to Reproduce

Steps to reproduce the behavior:

  1. clone git repository
  2. make any commit
  3. observe that the commit is successful.
  4. run make start command
  5. try to make commit again
  6. see error env: php: No such file or directory

Additional info

After removing vendor folder and try to commit again, it shows new error .git/hooks/pre-commit: line 17: vendor/bin/captainhook: No such file or directory. Probably this happen, because captainHook trying to execute himself using php on local machine not from docker container.

Environment

paaneko commented 4 months ago
"config": {
        "run": {
            "mode": "docker",
            "exec": "docker compose exec -i php"
        }
    },

Can be fixed by this in captainhook.json

Kravalg commented 4 months ago

@Derane please test this and write what is behaviour on your machine