From 32bc9161a055a6df5f74c8099b8d0573d6bbf9c4 Mon Sep 17 00:00:00 2001 From: Noam Okman Date: Tue, 19 Sep 2017 19:15:32 +0300 Subject: [PATCH] added HUSKY_SKIP_INSTALL env variable to skip hook install (#178) --- bin/install.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/install.js b/bin/install.js index 7a05be4f9..df39aae38 100755 --- a/bin/install.js +++ b/bin/install.js @@ -12,6 +12,11 @@ if (isCI && !process.env.HUSKY_IGNORE_CI) { process.exit(0) } +if (process.env.HUSKY_SKIP_INSTALL) { + console.log(`env variable HUSKY_SKIP_INSTALL is set to ${process.env.HUSKY_SKIP_INSTALL}, skipping Git hooks installation`) + process.exit(0) +} + console.log('setting up Git hooks') const huskyDir = path.join(__dirname, '..')