aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/terminal/shellintegration.cpp
diff options
context:
space:
mode:
authorMarcus Tillmanns <[email protected]>2024-02-06 09:32:32 +0100
committerMarcus Tillmanns <[email protected]>2024-02-07 08:05:11 +0000
commit3ec09a1c3dba598261f0e43787081574100f313e (patch)
tree0c743195e46eca7ba42c501f23ece8d2da96e892 /src/plugins/terminal/shellintegration.cpp
parent3259b1cb251dd60c024e9f870ab925fa8a7ca005 (diff)
Terminal: Fix powershell integration
Previously a "1" was printed every time a powershell terminal was started. Change-Id: Ibd6f9dc9de8ba11ede98e13ca2f65ba5a99536fb Reviewed-by: Cristian Adam <[email protected]>
Diffstat (limited to 'src/plugins/terminal/shellintegration.cpp')
-rw-r--r--src/plugins/terminal/shellintegration.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/terminal/shellintegration.cpp b/src/plugins/terminal/shellintegration.cpp
index 2d3e8f986f7..fc97d76cff2 100644
--- a/src/plugins/terminal/shellintegration.cpp
+++ b/src/plugins/terminal/shellintegration.cpp
@@ -199,7 +199,9 @@ void ShellIntegration::prepareProcess(Utils::Process &process)
m_tempDir.filePath(filesToCopy.pwsh.script.fileName()));
rcPath.copyFile(tmpRc);
- cmd.addArgs(QString("-noexit -command try { . \"%1\" } catch {}{1}").arg(tmpRc.nativePath()),
+ cmd.addArgs(QString("-noexit -command try { . \"%1\" } catch {Write-Host \"Shell "
+ "integration error:\" $_}")
+ .arg(tmpRc.nativePath()),
CommandLine::Raw);
} else if (cmd.executable().baseName() == "cmd") {
const FilePath rcPath = filesToCopy.clink.script;