Skip to content

Commit 2843b82

Browse files
committed
Merge pull request microsoft#226 from sparecycles/contrib/node-modules-path-4-mac
fix path in Jakefile (for mac)
2 parents fd35c62 + b6cf356 commit 2843b82

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

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)