Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: prevent VsDevCmd.bat from changing cwd #14303

Closed
wants to merge 0 commits into from
Closed

build: prevent VsDevCmd.bat from changing cwd #14303

wants to merge 0 commits into from

Conversation

seishun
Copy link
Contributor

@seishun seishun commented Jul 16, 2017

VsDevCmd.bat changes the current working directory to "%USERPROFILE%\Source" if it exists. Setting VSCMD_START_DIR overrides this behavior.

Refs: https://developercommunity.visualstudio.com/content/problem/26780/vsdevcmdbat-changes-the-current-working-directory.html
Fixes: #14300

Checklist
Affected core subsystem(s)

build

@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. windows Issues and PRs related to the Windows platform. labels Jul 16, 2017
@seishun seishun requested a review from refack July 16, 2017 13:20
@gibfahn
Copy link
Member

gibfahn commented Jul 16, 2017

What?

LGTM anyway.

@seishun
Copy link
Contributor Author

seishun commented Jul 16, 2017

What?

What? 😕

@gibfahn
Copy link
Member

gibfahn commented Jul 16, 2017

From the page you linked:

This was a design change that was made for the developer command prompt scripts for Visual Studio 2017. However, there is an "escape hatch" available to ensure the command prompt ends up in a known directory.

I just found this a bit mystifying (especially as it breaks things). Why does setting up your dev environment cd you into a different directory?

Copy link
Contributor

@refack refack left a comment

Choose a reason for hiding this comment

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

🤦‍♂️

seishun added a commit that referenced this pull request Jul 17, 2017
VsDevCmd.bat changes the current working directory to
"%USERPROFILE%\Source" if it exists. Setting VSCMD_START_DIR overrides
this behavior.

PR-URL: #14303
Fixes: #14300
Refs: https://developercommunity.visualstudio.com/content/problem/26780/vsdevcmdbat-changes-the-current-working-directory.html
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@seishun seishun closed this Jul 17, 2017
@seishun seishun deleted the start-dir branch July 17, 2017 19:06
@seishun
Copy link
Contributor Author

seishun commented Jul 17, 2017

Landed in be3f3d4.

@addaleax addaleax mentioned this pull request Jul 18, 2017
addaleax pushed a commit that referenced this pull request Jul 18, 2017
VsDevCmd.bat changes the current working directory to
"%USERPROFILE%\Source" if it exists. Setting VSCMD_START_DIR overrides
this behavior.

PR-URL: #14303
Fixes: #14300
Refs: https://developercommunity.visualstudio.com/content/problem/26780/vsdevcmdbat-changes-the-current-working-directory.html
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Fishrock123 pushed a commit that referenced this pull request Jul 19, 2017
VsDevCmd.bat changes the current working directory to
"%USERPROFILE%\Source" if it exists. Setting VSCMD_START_DIR overrides
this behavior.

PR-URL: #14303
Fixes: #14300
Refs: https://developercommunity.visualstudio.com/content/problem/26780/vsdevcmdbat-changes-the-current-working-directory.html
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorins
Copy link
Contributor

Should this be backported to v6.x-staging? If yes please follow the guide and raise a backport PR, if no let me know or add the dont-land-on label.

@seishun
Copy link
Contributor Author

seishun commented Aug 16, 2017

Not worth bothering for non-master IMO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vcbuild changes current directory and fails to find python
7 participants