diff options
author | hjk <hjk@qt.io> | 2022-11-16 09:27:18 +0100 |
---|---|---|
committer | hjk <hjk@qt.io> | 2022-11-21 12:17:47 +0000 |
commit | 33ea6f24333805381db63c4074315748bc3cf58e (patch) | |
tree | e5e675c87cbc49559fe5ca061a0168460120c9a3 /src/libs | |
parent | fd177245976f01b4d61e27759fb51bb0ea8eaf2d (diff) |
Utils: Don't resolve relative paths in ProcessArgs::prepareCommand
Part of an attempt to disentangle streamline environment creation/setup.
Searching is expensive and needs currently the proper environment.
Change-Id: I95d93abf6c0cedeb8ba0b7a447345cd033ac2f25
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/libs')
-rw-r--r-- | src/libs/utils/commandline.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libs/utils/commandline.cpp b/src/libs/utils/commandline.cpp index 77e33fc83b..41aa9b29bd 100644 --- a/src/libs/utils/commandline.cpp +++ b/src/libs/utils/commandline.cpp @@ -632,12 +632,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) { - FilePath executable = cmdLine.executable(); - const QString arguments = cmdLine.arguments(); - if (env && executable.isRelativePath()) - executable = env->searchInPath(executable.toString()); + const FilePath executable = cmdLine.executable(); if (executable.isEmpty()) return false; + const QString arguments = cmdLine.arguments(); ProcessArgs::SplitError err; *outArgs = ProcessArgs::prepareArgs(arguments, &err, executable.osType(), env, pwd); if (err == ProcessArgs::SplitOk) { |