You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running gitlab CI (gitlab runner on an ubuntu server) .
Husky version : 4.2.3
And It seems that husky doesn't check if in CI when trying to uninstall it .
In my CI I need to do yarn install, and after npm install, so husky is installed, desinstalled and so reinstalled .
So this just log an error :
ENOENT: no such file or directory, unlink '/home/gitlab-runner/builds/coBbus79/1/API/.git/hooks/husky.local.sh'
husky > Failed to uninstall
In my opinion, you need to check if husky is installed, and just skip the error log if CI ?
Here is the output with debug
husky > Uninstalling git hooks
husky:debug Current working directory is /home/gitlab-runner/builds/coBbus79/1/API/node_modules/husky
husky:debug INIT_CWD is set to /home/gitlab-runner/builds/coBbus79/1/API
husky:debug Git rev-parse command returned:
husky:debug --git-common-dir: .git
husky:debug --show-prefix:
ENOENT: no such file or directory, unlink '/home/gitlab-runner/builds/coBbus79/1/API/.git/hooks/husky.local.sh'
husky:debug Error: ENOENT: no such file or directory, unlink '/home/gitlab-runner/builds/coBbus79/1/API/.git/hooks/husky.local.sh'
at Object.unlinkSync (fs.js:1052:3)
at Object.removeLocalScript (/home/gitlab-runner/builds/coBbus79/1/API/node_modules/husky/lib/installer/localScript.js:19:8)
at Object.uninstall (/home/gitlab-runner/builds/coBbus79/1/API/node_modules/husky/lib/installer/index.js:54:19)
at run (/home/gitlab-runner/builds/coBbus79/1/API/node_modules/husky/lib/installer/bin.js:78:16)
at Object.<anonymous> (/home/gitlab-runner/builds/coBbus79/1/API/node_modules/husky/lib/installer/bin.js:88:1)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
at Module.require (internal/modules/cjs/loader.js:1044:19)
husky > Failed to uninstall
husky > Setting up git hooks
husky:debug Current working directory is /home/gitlab-runner/builds/coBbus79/1/API/node_modules/husky
husky:debug INIT_CWD is set to /home/gitlab-runner/builds/coBbus79/1/API
husky:debug Git rev-parse command returned:
husky:debug --git-common-dir: .git
husky:debug --show-prefix:
husky:debug Package manager: npm
CI detected, skipping Git hooks installation.
husky > Done
The text was updated successfully, but these errors were encountered:
Hello,
I'm running gitlab CI (gitlab runner on an ubuntu server) .
Husky version : 4.2.3
And It seems that husky doesn't check if in CI when trying to uninstall it .
In my CI I need to do
yarn install
, and afternpm install
, so husky is installed, desinstalled and so reinstalled .So this just log an error :
In my opinion, you need to check if husky is installed, and just skip the error log if CI ?
Here is the output with debug
The text was updated successfully, but these errors were encountered: