Skip to content

Conversation

@seishun
Copy link
Contributor

@seishunseishun 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-botnodejs-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
@seishunseishun requested a review from refackJuly 16, 2017 13:20
@gibfahn
Copy link
Member

What?

LGTM anyway.

@seishun
Copy link
ContributorAuthor

What?

What? 😕

@gibfahn
Copy link
Member

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

@refackrefack 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: #14303Fixes: #14300 Refs: https://developercommunity.visualstudio.com/content/problem/26780/vsdevcmdbat-changes-the-current-working-directory.html Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: James M Snell <[email protected]>
@seishunseishun closed this Jul 17, 2017
@seishunseishun deleted the start-dir branch July 17, 2017 19:06
@seishun
Copy link
ContributorAuthor

Landed in be3f3d4.

@addaleaxaddaleax 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: #14303Fixes: #14300 Refs: https://developercommunity.visualstudio.com/content/problem/26780/vsdevcmdbat-changes-the-current-working-directory.html Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: James M Snell <[email protected]>
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: #14303Fixes: #14300 Refs: https://developercommunity.visualstudio.com/content/problem/26780/vsdevcmdbat-changes-the-current-working-directory.html Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: James M Snell <[email protected]>
@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
ContributorAuthor

Not worth bothering for non-master IMO.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

buildIssues and PRs related to build files or the CI.windowsIssues 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

@seishun@gibfahn@MylesBorins@refack@jasnell@richardlau@nodejs-github-bot