mirror of
https://github.com/microsoft/terminal.git
synced 2025-12-10 00:48:23 -06:00
Fix cwd not applying on launch (#18801)
(cherry picked from commit 3accdcfc6bf17a6b3fc4dfc26b816ba16ec410de) Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgZa8w8 Service-Version: 1.23
This commit is contained in:
parent
840f9623e5
commit
b2cf9d1bac
@ -17,7 +17,7 @@ namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
CommandlineArgs::CommandlineArgs(winrt::array_view<const winrt::hstring> args, winrt::hstring currentDirectory, uint32_t showWindowCommand, winrt::hstring envString) :
|
||||
_args{ args.begin(), args.end() },
|
||||
_cwd{ std::move(currentDirectory) },
|
||||
CurrentDirectory{ std::move(currentDirectory) },
|
||||
ShowWindowCommand{ showWindowCommand },
|
||||
CurrentEnvironment{ std::move(envString) }
|
||||
{
|
||||
|
||||
@ -36,7 +36,6 @@ namespace winrt::TerminalApp::implementation
|
||||
::TerminalApp::AppCommandlineArgs _parsed;
|
||||
int32_t _parseResult = 0;
|
||||
winrt::com_array<winrt::hstring> _args;
|
||||
winrt::hstring _cwd;
|
||||
};
|
||||
|
||||
struct RequestReceiveContentArgs : RequestReceiveContentArgsT<RequestReceiveContentArgs>
|
||||
|
||||
@ -563,8 +563,11 @@ namespace winrt::TerminalApp::implementation
|
||||
_WindowProperties.VirtualEnvVars(originalVirtualEnv);
|
||||
}
|
||||
});
|
||||
_WindowProperties.VirtualWorkingDirectory(cwd);
|
||||
_WindowProperties.VirtualEnvVars(env);
|
||||
if (!cwd.empty())
|
||||
{
|
||||
_WindowProperties.VirtualWorkingDirectory(cwd);
|
||||
_WindowProperties.VirtualEnvVars(env);
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < actions.size(); ++i)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user