forked from qt-creator/qt-creator
CommandLine: Find executable in PATH when it is relative
Task-number: QTCREATORBUG-26329 Change-Id: Ie7b30ea5c73d11e4a9961bdaa732ee36e0e377e7 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
f2a157897f
commit
13067a7d9c
@@ -647,8 +647,10 @@ void ProcessArgs::addArgs(QString *args, const QStringList &inArgs)
|
||||
bool ProcessArgs::prepareCommand(const CommandLine &cmdLine, QString *outCmd, ProcessArgs *outArgs,
|
||||
const Environment *env, const FilePath *pwd)
|
||||
{
|
||||
const FilePath executable = cmdLine.executable();
|
||||
FilePath executable = cmdLine.executable();
|
||||
const QString arguments = cmdLine.arguments();
|
||||
if (env && executable.isRelativePath())
|
||||
executable = env->searchInPath(executable.toString());
|
||||
ProcessArgs::SplitError err;
|
||||
*outArgs = ProcessArgs::prepareArgs(arguments, &err, executable.osType(), env, pwd);
|
||||
if (err == ProcessArgs::SplitOk) {
|
||||
|
Reference in New Issue
Block a user