diff --git a/cli.js b/cli.js index 78b9865..394e67a 100644 --- a/cli.js +++ b/cli.js @@ -6,6 +6,13 @@ */ const {setHooksFromConfig} = require('./simple-git-hooks') +const {SKIP_INSTALL_SIMPLE_GIT_HOOKS} = process.env + +if (['1', 'true'].includes(SKIP_INSTALL_SIMPLE_GIT_HOOKS)) { + console.log(`[INFO] SKIP_INSTALL_SIMPLE_GIT_HOOKS is set to "${SKIP_INSTALL_SIMPLE_GIT_HOOKS}", skipping installing hook.`) + return +} + try { setHooksFromConfig(process.cwd(), process.argv) console.log('[INFO] Successfully set all git hooks')