forked from qt-creator/qt-creator
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:
@@ -119,9 +119,13 @@ FilePath ProcessParameters::effectiveCommand() const
|
|||||||
FilePath cmd = m_command.executable();
|
FilePath cmd = m_command.executable();
|
||||||
if (m_macroExpander)
|
if (m_macroExpander)
|
||||||
cmd = m_macroExpander->expand(cmd);
|
cmd = m_macroExpander->expand(cmd);
|
||||||
m_effectiveCommand =
|
if (cmd.needsDevice()) {
|
||||||
m_environment.searchInPath(cmd.toString(),
|
// Assume this is already good. FIXME: It is possibly not, so better fix searchInPath.
|
||||||
{effectiveWorkingDirectory()});
|
m_effectiveCommand = cmd;
|
||||||
|
} else {
|
||||||
|
m_effectiveCommand = m_environment.searchInPath(cmd.toString(),
|
||||||
|
{effectiveWorkingDirectory()});
|
||||||
|
}
|
||||||
m_commandMissing = m_effectiveCommand.isEmpty();
|
m_commandMissing = m_effectiveCommand.isEmpty();
|
||||||
if (m_commandMissing)
|
if (m_commandMissing)
|
||||||
m_effectiveCommand = cmd;
|
m_effectiveCommand = cmd;
|
||||||
|
|||||||
Reference in New Issue
Block a user