Skip to content

Commit

Permalink
VsDevCmdGenerator: respect the user's startingDirectory (#15035)
Browse files Browse the repository at this point in the history
The PowerShell equivalent was added in the initial pull request, #7774.

Closes #13721
  • Loading branch information
DHowett authored Mar 23, 2023
1 parent 0f7d1f4 commit f06cd17
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/actions/spelling/expect/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1771,6 +1771,7 @@ srv
srvinit
srvpipe
ssa
startdir
STARTF
STARTUPINFO
STARTUPINFOEX
Expand Down
3 changes: 3 additions & 0 deletions src/cascadia/TerminalSettingsModel/VsDevCmdGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ std::wstring VsDevCmdGenerator::GetProfileCommandLine(const VsSetupConfiguration
commandLine.reserve(256);
commandLine.append(LR"(cmd.exe /k ")");
commandLine.append(GetDevCmdScriptPath(instance));
// The "-startdir" parameter will prevent "vsdevcmd" from automatically
// setting the shell path so the path in the profile will be used instead.
commandLine.append(LR"(" -startdir=none)");
#if defined(_M_ARM64)
commandLine.append(LR"(" -arch=arm64 -host_arch=x64)");
#elif defined(_M_AMD64)
Expand Down

0 comments on commit f06cd17

Please sign in to comment.