Skip to content

Commit

Permalink
Windows bin escaping fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Jul 19, 2019
1 parent 1310d35 commit 34c329d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/install/bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const winBin = (binModulePath: string) => `@setlocal
@echo jspm not found in path, make sure it is installed globally.
@exit /B 1
)
@set NODE_OPTIONS=--experimental-modules --no-warnings --loader /%JSPM_PATH%node_modules\\jspm\\node_modules\\@jspm\\resolve\\loader.mjs
@set NODE_OPTIONS=--experimental-modules --no-warnings --loader "//%JSPM_PATH%node_modules\\jspm\\node_modules\\@jspm\\resolve\\loader.mjs"
@node "%~dp0\\..\\${binModulePath}" %*
`;

Expand All @@ -82,9 +82,8 @@ function isCygwin () {
export function getBin () {
let loader = require.resolve('@jspm/resolve/loader.mjs');
if (isWindows) {
loader = '/' + loader;
if (isCygwin())
return `set NODE_OPTIONS=--experimental-modules --loader ${loader} && node`;
loader = '//' + loader;
return `set NODE_OPTIONS=--experimental-modules --no-warnings --loader ${loader} && node`;
}
return `NODE_OPTIONS="--experimental-modules --no-warnings --loader ${loader}" node`;
return `NODE_OPTIONS=--experimental-modules --no-warnings --loader ${loader} node`;
}

0 comments on commit 34c329d

Please sign in to comment.