From 770af0ae1b0e9b31135e5fee2090ce496377cbda Mon Sep 17 00:00:00 2001 From: Leonard Hecker Date: Thu, 25 May 2023 20:21:57 +0200 Subject: [PATCH] Fix VS profile command generation (#15439) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This regressed in f06cd17. It seems like the change went untested, because it appends an extra " after -startdir=none. This changeset also avoids calling `append()` twice. Closes #15436 ## Validation Steps Performed * VS Developer Command Prompt works ✅ (cherry picked from commit 0073e36d811462d6d17ea4ae5563b83567af4d8b) Service-Card-Id: 89324784 Service-Version: 1.17 --- src/cascadia/TerminalSettingsModel/VsDevCmdGenerator.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/cascadia/TerminalSettingsModel/VsDevCmdGenerator.cpp b/src/cascadia/TerminalSettingsModel/VsDevCmdGenerator.cpp index ed371d9b04d..e27e0bab6dc 100644 --- a/src/cascadia/TerminalSettingsModel/VsDevCmdGenerator.cpp +++ b/src/cascadia/TerminalSettingsModel/VsDevCmdGenerator.cpp @@ -44,11 +44,12 @@ std::wstring VsDevCmdGenerator::GetProfileCommandLine(const VsSetupConfiguration 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)"); + commandLine.append(LR"(" -startdir=none -arch=arm64 -host_arch=x64)"); #elif defined(_M_AMD64) - commandLine.append(LR"(" -arch=x64 -host_arch=x64)"); + commandLine.append(LR"(" -startdir=none -arch=x64 -host_arch=x64)"); +#else + commandLine.append(LR"(" -startdir=none)"); #endif return commandLine; }