Skip to content

Commit b9c40ee

Browse files
filipesilvahansl
authored andcommitted
fix(@angular/cli): fix PWD in cygwin
Fix #10232
1 parent 325baa6 commit b9c40ee

File tree

3 files changed

+1
-9
lines changed

3 files changed

+1
-9
lines changed

packages/@angular/cli/lib/cli/index.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import * as path from 'path';
21
import { filter } from 'rxjs/operators';
32
import { logging, terminal } from '@angular-devkit/core';
43
import { runCommand } from '../../models/command-runner';
@@ -41,10 +40,6 @@ function loadCommands() {
4140
}
4241

4342
export default async function(options: any) {
44-
// ensure the environemnt variable for dynamic paths
45-
process.env.PWD = path.normalize(process.env.PWD || process.cwd());
46-
process.env.CLI_ROOT = process.env.CLI_ROOT || path.resolve(__dirname, '..', '..');
47-
4843
const commands = loadCommands();
4944

5045
const logger = new logging.IndentLogger('cling');

packages/@angular/cli/models/schematic-command.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,7 @@ export abstract class SchematicCommand extends Command {
9797
},
9898
);
9999

100-
const cwd = process.env.PWD;
101-
const workingDir = cwd.replace(this.project.root, '').replace(/\\/g, '/');
100+
const workingDir = process.cwd().replace(this.project.root, '').replace(/\\/g, '/');
102101
const pathOptions = this.setPathOptions(schematicOptions, workingDir);
103102
schematicOptions = { ...schematicOptions, ...pathOptions };
104103
const defaultOptions = this.readDefaults(collectionName, schematicName, schematicOptions);

tests/e2e/utils/process.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,6 @@ export function execAndWaitForOutputToMatch(cmd: string, args: string[], match:
171171

172172
let npmInstalledEject = false;
173173
export function ng(...args: string[]) {
174-
process.env.PWD = process.cwd();
175-
176174
const argv = getGlobalVariable('argv');
177175
const maybeSilentNg = argv['nosilent'] ? noSilentNg : silentNg;
178176
if (['build', 'serve', 'test', 'e2e', 'xi18n'].indexOf(args[0]) != -1) {

0 commit comments

Comments
 (0)