Skip to content

Commit 6c84d51

Browse files
Merge pull request #4 from NativeScript/fix-npm5-local-installations
Use and process.env.INIT_CWD to find path to app for npm5 local installs
2 parents db91878 + 75e9a3e commit 6c84d51

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ function generateHookName(pkg, hook) {
2424
}
2525

2626
function findProjectDir(pkgdir) {
27+
if (process.env.INIT_CWD) {
28+
return process.env.INIT_CWD;
29+
}
30+
2731
var candidateDir = pkgdir;
2832

2933
while (true) {

0 commit comments

Comments
 (0)