ProjectExplorer: Short-circuit ProcessParameters::effectiveCommand

... in case of remote commands.

This is enough for docker related searches for now, on the other
hand, Environment::searchInPath is not yet generic enough to cope
with remote searches.

Add a FIXME so this is not forgotten.

Change-Id: I97f3c75069a17256c83dc9f8a73ae1c1c235465f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2021-04-26 17:12:49 +02:00
parent a43c91b16d
commit 89ab11d539

View File

@@ -119,9 +119,13 @@ FilePath ProcessParameters::effectiveCommand() const
FilePath cmd = m_command.executable();
if (m_macroExpander)
cmd = m_macroExpander->expand(cmd);
m_effectiveCommand =
m_environment.searchInPath(cmd.toString(),
{effectiveWorkingDirectory()});
if (cmd.needsDevice()) {
// Assume this is already good. FIXME: It is possibly not, so better fix searchInPath.
m_effectiveCommand = cmd;
} else {
m_effectiveCommand = m_environment.searchInPath(cmd.toString(),
{effectiveWorkingDirectory()});
}
m_commandMissing = m_effectiveCommand.isEmpty();
if (m_commandMissing)
m_effectiveCommand = cmd;