Bug 529656 - Error if docker build failed

If the build command in a container build terminates with non zero exit
code (e.g. make command not found) an error is displayed.

Change-Id: Ib6349aa6c22c1a3bb9c0d2920110bc69773f8da1
Signed-off-by: Hannes Vogt <hannes@havogt.de>
This commit is contained in:
Hannes Vogt 2018-10-21 16:51:34 +02:00 committed by Jeff Johnston
parent 1fa5f7d6e5
commit e61ba5a731
2 changed files with 5 additions and 0 deletions

View file

@ -277,6 +277,10 @@ public class BuildRunnerHelper implements Closeable {
if (status != ICommandLauncher.OK) {
errMsg = launcher.getErrorMessage();
}
else if(p.exitValue() != 0) {
errMsg = CCorePlugin.getFormattedString("BuildRunnerHelper.commandNonZeroExitCode", //$NON-NLS-1$
new String[] { guessCommandLine(buildCommand.toString(), args), Integer.toString(p.exitValue())});
}
} else {
errMsg = launcher.getErrorMessage();
}

View file

@ -95,6 +95,7 @@ CCorePlugin.startupJob=CDT Startup
BuildRunnerHelper.unsupportedConfiguration=Info: Configuration "{0}" uses tool-chain "{1}" that is unsupported on this system, attempting to build anyway.
BuildRunnerHelper.removingMarkers=Removing problem markers for {0}
BuildRunnerHelper.invokingCommand=Invoking Command: {0}
BuildRunnerHelper.commandNonZeroExitCode="{0}" terminated with exit code {1}. Build might be incomplete.
BuildRunnerHelper.refreshingProject=Refreshing resource tree of project {0}
BuildRunnerHelper.buildProject={0} of project {1}
BuildRunnerHelper.buildProjectConfiguration={0} of configuration {1} for project {2}