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