diff --git a/index.js b/index.js index 3ae1f2a..c8f6183 100644 --- a/index.js +++ b/index.js @@ -24,6 +24,10 @@ function generateHookName(pkg, hook) { } function findProjectDir(pkgdir) { + if (process.env.INIT_CWD) { + return process.env.INIT_CWD; + } + var candidateDir = pkgdir; while (true) {