Skip to content

fix(@angular/cli): fix PWD in cygwin#10778

Merged
hansl merged 1 commit into
angular:masterfrom
filipesilva:schematics-cygwin
May 10, 2018
Merged

fix(@angular/cli): fix PWD in cygwin#10778
hansl merged 1 commit into
angular:masterfrom
filipesilva:schematics-cygwin

Conversation

@filipesilva
Copy link
Copy Markdown
Contributor

Fix #10232

Comment thread packages/@angular/cli/lib/cli/index.ts Outdated
process.env.PWD = path.normalize(process.env.PWD || process.cwd());
// Ensure the environment variables for dynamic paths are set.
// We can't use the existing process.env.PWD because it can be incorrect in shells like cygwin.
process.env.PWD = process.cwd();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only used here: https://github.com/angular/angular-cli/blob/master/packages/%40angular/cli/models/schematic-command.ts#L100
If that is changed to use process.cwd(), the line here can be removed. The following line appears completely unused as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Copy Markdown
Contributor

@Brocco Brocco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That value is also set for tests (done originally for consistency) So please also remove this reference.

process.env.PWD = process.cwd();

@filipesilva
Copy link
Copy Markdown
Contributor Author

@Brocco done.

Copy link
Copy Markdown
Contributor

@Brocco Brocco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@hansl hansl merged commit b9c40ee into angular:master May 10, 2018
@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generated schematic created in unexpected directory

5 participants