fix(bin): add root modules to NODE_PATH

This commit is contained in:
zkochan committed 2017-01-09 18:24:58 +02:00
1 parent f90aaed777
commit 884f1083d8
1 file changed
+3 -2
+3 -2
View File
@@ -67,8 +67,9 @@ export async function linkPkgBins (modules: string, target: string, preserveSyml
function getNodePaths (filename: string): string[] {
const next = path.join(filename, '..')
if (filename === next) return []
return [path.join(filename, 'node_modules')].concat(getNodePaths(next))
const modules = path.join(filename, 'node_modules')
if (filename === next) return [modules]
return [modules].concat(getNodePaths(next))
}
function makeExecutable (filePath: string) {