fix(bin): add root modules to NODE_PATH
This commit is contained in:
1 file changed
+3
-2
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user