From 426dbc2f94f2845a8814118e97088178b014ad37 Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Tue, 6 Feb 2024 14:38:46 +0100 Subject: [PATCH] Terminal: Escape spaces for powershell paths For the users that have a space in their user name, the location of the shellintegration.ps1 is a path with a space in it. This patchset fixes the escaping of that space. Change-Id: Iae84b2e8a8f1b4e2b7e523e28417caaeb77bc5cd Reviewed-by: Marcus Tillmanns --- src/plugins/terminal/shellintegration.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/terminal/shellintegration.cpp b/src/plugins/terminal/shellintegration.cpp index fc97d76cff2..5dfd450e68c 100644 --- a/src/plugins/terminal/shellintegration.cpp +++ b/src/plugins/terminal/shellintegration.cpp @@ -199,7 +199,7 @@ void ShellIntegration::prepareProcess(Utils::Process &process) m_tempDir.filePath(filesToCopy.pwsh.script.fileName())); rcPath.copyFile(tmpRc); - cmd.addArgs(QString("-noexit -command try { . \"%1\" } catch {Write-Host \"Shell " + cmd.addArgs(QString("-noexit -command try { . '%1' } catch {Write-Host \"Shell " "integration error:\" $_}") .arg(tmpRc.nativePath()), CommandLine::Raw);