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."));
|
" is currently not supported."));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
pcmd = QLatin1String("/bin/sh");
|
pcmd = qEnvironmentVariable("SHELL", "/bin/sh");
|
||||||
pargs = QtcProcess::Arguments::createUnixArgs(
|
pargs = QtcProcess::Arguments::createUnixArgs(
|
||||||
{"-c", (QtcProcess::quoteArg(d->m_commandLine.executable().toString())
|
{"-c", (QtcProcess::quoteArg(d->m_commandLine.executable().toString())
|
||||||
+ ' ' + d->m_commandLine.arguments())});
|
+ ' ' + d->m_commandLine.arguments())});
|
||||||
|
@@ -663,7 +663,7 @@ bool QtcProcess::prepareCommand(const QString &command, const QString &arguments
|
|||||||
} else {
|
} else {
|
||||||
if (err != QtcProcess::FoundMeta)
|
if (err != QtcProcess::FoundMeta)
|
||||||
return false;
|
return false;
|
||||||
*outCmd = QLatin1String("/bin/sh");
|
*outCmd = qEnvironmentVariable("SHELL", "/bin/sh");
|
||||||
*outArgs = Arguments::createUnixArgs(
|
*outArgs = Arguments::createUnixArgs(
|
||||||
QStringList({"-c", (quoteArg(command) + ' ' + arguments)}));
|
QStringList({"-c", (quoteArg(command) + ' ' + arguments)}));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user