From 907e3d4bfd0b3e8187b183d2940c181e0d156b0e Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 17 Jan 2017 15:58:05 +0000 Subject: [PATCH] fix(generate): normalize pwd before using it `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 #1639 --- packages/angular-cli/lib/cli/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular-cli/lib/cli/index.js b/packages/angular-cli/lib/cli/index.js index 6b4550f8eb85..6bddeabc3ccf 100644 --- a/packages/angular-cli/lib/cli/index.js +++ b/packages/angular-cli/lib/cli/index.js @@ -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);