Skip to content

Commit 75493b1

Browse files
filipesilvaMRHarrison
authored andcommitted
fix(generate): normalize pwd before using it (angular#4065)
`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
1 parent 1a5362c commit 75493b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/angular-cli/lib/cli/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ module.exports = function(options) {
3232
};
3333

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

3838
return cli(options);

0 commit comments

Comments
 (0)