8000 fix node_module path in Jakefile (mac too) · wheercool/TypeScript@b6cf356 · GitHub
[go: up one dir, main page]

Skip to content

Commit b6cf356

Browse files
committed
fix node_module path in Jakefile (mac too)
1 parent 64ab02e commit b6cf356

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Jakefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@ var copyright = "CopyrightNotice.txt";
1818
var thirdParty = "ThirdPartyNoticeText.txt";
1919

2020
// add node_modules to path so we don't need global modules, prefer the modules by adding them first
21-
process.env.path = path.resolve("./node_modules/.bin/") + path.delimiter + process.env.path;
21+
var nodeModulesPathPrefix = path.resolve("./node_modules/.bin/") + path.delimiter;
22+
if (process.env.path !== undefined) {
23+
process.env.path = nodeModulesPathPrefix + process.env.path;
24+
} else if (process.env.PATH !== undefined) {
25+
process.env.PATH = nodeModulesPathPrefix + process.env.PATH;
26+
}
2227

2328
var compilerSources = [
2429
"core.ts",

0 commit comments

Comments
 (0)
0