forked from qt-creator/qt-creator
Terminal: Fix powershell integration
Previously a "1" was printed every time a powershell terminal was started. Change-Id: Ibd6f9dc9de8ba11ede98e13ca2f65ba5a99536fb Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -199,7 +199,9 @@ void ShellIntegration::prepareProcess(Utils::Process &process)
|
|||||||
m_tempDir.filePath(filesToCopy.pwsh.script.fileName()));
|
m_tempDir.filePath(filesToCopy.pwsh.script.fileName()));
|
||||||
rcPath.copyFile(tmpRc);
|
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);
|
CommandLine::Raw);
|
||||||
} else if (cmd.executable().baseName() == "cmd") {
|
} else if (cmd.executable().baseName() == "cmd") {
|
||||||
const FilePath rcPath = filesToCopy.clink.script;
|
const FilePath rcPath = filesToCopy.clink.script;
|
||||||
|
|||||||
Reference in New Issue
Block a user