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

(cherry picked from commit f06cd17)
Service-Card-Id: 88719282
Service-Version: 1.17
  • Loading branch information
DHowett committed Mar 31, 2023
1 parent 31ae78d commit d6d3561
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 @@ -1776,6 +1776,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 d6d3561

Please sign in to comment.