forked from qt-creator/qt-creator
Utils: Determine shell from $SHELL instead of hard-coding /bin/sh
Fixes: QTCREATORBUG-24659 Change-Id: Icafc001b681cc76af76b8759a4de84db51146fd4 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -516,7 +516,7 @@ bool ConsoleProcess::start()
|
||||
" is currently not supported."));
|
||||
return false;
|
||||
}
|
||||
pcmd = QLatin1String("/bin/sh");
|
||||
pcmd = qEnvironmentVariable("SHELL", "/bin/sh");
|
||||
pargs = QtcProcess::Arguments::createUnixArgs(
|
||||
{"-c", (QtcProcess::quoteArg(d->m_commandLine.executable().toString())
|
||||
+ ' ' + d->m_commandLine.arguments())});
|
||||
|
@@ -663,7 +663,7 @@ bool QtcProcess::prepareCommand(const QString &command, const QString &arguments
|
||||
} else {
|
||||
if (err != QtcProcess::FoundMeta)
|
||||
return false;
|
||||
*outCmd = QLatin1String("/bin/sh");
|
||||
*outCmd = qEnvironmentVariable("SHELL", "/bin/sh");
|
||||
*outArgs = Arguments::createUnixArgs(
|
||||
QStringList({"-c", (quoteArg(command) + ' ' + arguments)}));
|
||||
}
|
||||
|
Reference in New Issue
Block a user