forked from qt-creator/qt-creator
AbstractProcessStep: Make isExecutableFile check a part of setupProcess
Task-number: QTCREATORBUG-29168 Change-Id: I47cc43f1465528354802fdc033fc6369e413b526 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -177,14 +177,6 @@ void AbstractProcessStep::setupOutputFormatter(OutputFormatter *formatter)
|
||||
|
||||
void AbstractProcessStep::doRun()
|
||||
{
|
||||
if (!d->m_param.effectiveCommand().isExecutableFile()) {
|
||||
emit addOutput(Tr::tr("The program \"%1\" does not exist or is not executable.")
|
||||
.arg(d->m_displayedParams->effectiveCommand().toUserOutput()),
|
||||
OutputFormat::ErrorMessage);
|
||||
finish(ProcessResult::StartFailed);
|
||||
return;
|
||||
}
|
||||
|
||||
setupStreams();
|
||||
|
||||
d->m_process.reset(new Process);
|
||||
@@ -218,6 +210,13 @@ bool AbstractProcessStep::setupProcess(Process &process)
|
||||
OutputFormat::ErrorMessage);
|
||||
return false;
|
||||
}
|
||||
if (!d->m_param.effectiveCommand().isExecutableFile()) {
|
||||
emit addOutput(Tr::tr("The program \"%1\" does not exist or is not executable.")
|
||||
.arg(d->m_displayedParams->effectiveCommand().toUserOutput()),
|
||||
OutputFormat::ErrorMessage);
|
||||
return false;
|
||||
}
|
||||
|
||||
process.setUseCtrlCStub(HostOsInfo::isWindowsHost());
|
||||
process.setWorkingDirectory(workingDir);
|
||||
// Enforce PWD in the environment because some build tools use that.
|
||||
|
Reference in New Issue
Block a user