From c90eb8763a2b1bf33017ffb63ba0b35b6120d7ae Mon Sep 17 00:00:00 2001 From: Mike Griese Date: Mon, 1 Nov 2021 09:09:33 -0500 Subject: [PATCH] good catch --- src/cascadia/TerminalApp/TerminalPage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cascadia/TerminalApp/TerminalPage.cpp b/src/cascadia/TerminalApp/TerminalPage.cpp index d22a638ff..000ba6c51 100644 --- a/src/cascadia/TerminalApp/TerminalPage.cpp +++ b/src/cascadia/TerminalApp/TerminalPage.cpp @@ -1588,7 +1588,7 @@ namespace winrt::TerminalApp::implementation // Using the string following "-d "... const auto afterDashD{ arguments.substr(dashD + 3) }; // Find the next space - const auto afterFirstWord = afterDashD.substr(dashD + 3).find(L" "); + const auto afterFirstWord = afterDashD.find(L" "); // if that space _wasn't_ at the end of the commandline, then // there were some other args. That means it was `wsl -d distro // anything`, and we should ask the user.