thoughtbot / gitsh

An interactive shell for git
https://thoughtbot.com
BSD 3-Clause "New" or "Revised" License
1.95k stars 105 forks source link

Hooks running commands like `npm run lint` will fail because `npm` cannot be found #385

Open ThaDaVos opened 3 years ago

ThaDaVos commented 3 years ago

Is there any way to get hooks, calling executables, to work?

For example, I've got a VueJs project setup with the npm run lint hook, to lint the files before push - but gitsh will fail as it cannot find npm

georgebrock commented 3 years ago

Could you post a bit more information? The output of the following commands from your regular shell would be useful:

echo $PATH
type npm
which -a npm
ThaDaVos commented 3 years ago

echo $PATH npm/usr/local/bin/swift/usr/bin:/home/dylan/.composer/vendor/bin:/home/dylan/.config/composer/vendor/bin:/home/dylan/.bash-scripts:/home/dylan/.local/bin:/c/Windows/System32/WindowsPowerShell/v1.0/:/c/Windows/System32:/home/dylan/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/snap/bin:/home/dylan/.dotnet/tools:/home/dylan/n/bin type npm npm is /home/dylan/n/bin/npm which -a npm /home/dylan/n/bin/npm