Skip to content

Commit

Permalink
Fix global add on Windows (#1043)
Browse files Browse the repository at this point in the history
* rename cmd link to cmd shim from .cmd.cmd to .cmd

* use !== instead of !=
  • Loading branch information
FLGMwt authored and bestander committed Jan 3, 2017
1 parent e660264 commit fdade5d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cli/commands/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ async function initUpdateBins(config: Config, reporter: Reporter, flags: Object)
try {
await fs.unlink(dest);
await linkBin(src, dest);
if (process.platform === 'win32' && dest.indexOf('.cmd') !== -1) {
await fs.rename(dest + '.cmd', dest);
}
} catch (err) {
throwPermError(err, dest);
}
Expand Down

0 comments on commit fdade5d

Please sign in to comment.