From e61ba5a7314e30cd74e4ab36afde006a4ea88553 Mon Sep 17 00:00:00 2001 From: Hannes Vogt Date: Sun, 21 Oct 2018 16:51:34 +0200 Subject: [PATCH] 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 --- .../src/org/eclipse/cdt/internal/core/BuildRunnerHelper.java | 4 ++++ .../eclipse/cdt/internal/core/CCorePluginResources.properties | 1 + 2 files changed, 5 insertions(+) diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/BuildRunnerHelper.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/BuildRunnerHelper.java index e81a51eb517..f3856dbff94 100644 --- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/BuildRunnerHelper.java +++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/BuildRunnerHelper.java @@ -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(); } diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CCorePluginResources.properties b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CCorePluginResources.properties index 8718aeaffa2..7ca8fea317a 100644 --- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CCorePluginResources.properties +++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CCorePluginResources.properties @@ -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}