Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion packages/@angular/cli/models/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ const CLI_CONFIG_FILE_NAME_ALT = 'angular-cli.json';


function getUserHome() {
return process.env[(process.platform.startsWith('win')) ? 'USERPROFILE' : 'HOME'];
const envHomeName = (process.platform.startsWith('win')) ? 'USERPROFILE' : 'HOME';
const env = process.env[envHomeName];
if (env == null) {
throw new Error('Missing environment variable ' + envHomeName);
}
return env;
}


Expand Down