Skip to content

Commit

Permalink
fix(generate): normalize pwd before using it
Browse files Browse the repository at this point in the history
`process.env.PWD` is different between gitbash and cmd
- gitbash: `D:/sandbox/master-project/src/app/other`
- cmd: `D:\sandbox\master-project\src\app\other`

Normalizing it via `path.normalize` solves the problem.

Fix angular#1639
  • Loading branch information
filipesilva committed Jan 17, 2017
1 parent c783968 commit 907e3d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/angular-cli/lib/cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module.exports = function(options) {
};

// ensure the environemnt variable for dynamic paths
process.env.PWD = process.env.PWD || process.cwd();
process.env.PWD = path.normalize(process.env.PWD || process.cwd());
process.env.CLI_ROOT = process.env.CLI_ROOT || path.resolve(__dirname, '..', '..');

return cli(options);
Expand Down

0 comments on commit 907e3d4

Please sign in to comment.