Skip to content

Commit d2a559f

Browse files
committed
Complain core maintainers only when appropriate
1 parent 2242b5c commit d2a559f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

constants/constants.go

+1
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ const LOG_LEVEL_INFO = "info"
154154
const LOG_LEVEL_WARN = "warn"
155155
const MSG_ARCH_FOLDER_NOT_SUPPORTED = "'arch' folder is no longer supported! See http://goo.gl/gfFJzU for more information"
156156
const MSG_ARCHIVING_CORE_CACHE = "Archiving built core (caching) in: {0}"
157+
const MSG_ERROR_ARCHIVING_CORE_CACHE = "Error archiving built core (caching) in {0}: {1}"
157158
const MSG_CORE_CACHE_UNAVAILABLE = "Unable to cache built core, please tell {0} maintainers to follow http://goo.gl/QdCUjo"
158159
const MSG_BOARD_UNKNOWN = "Board {0} (platform {1}, package {2}) is unknown"
159160
const MSG_BOOTLOADER_FILE_MISSING = "Bootloader file specified but missing: {0}"

phases/core_builder.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
package phases
3131

3232
import (
33+
"os"
3334
"path/filepath"
3435

3536
"github.com/arduino/arduino-builder/builder_utils"
@@ -128,8 +129,10 @@ func compileCore(ctx *types.Context, buildPath string, buildCachePath string, bu
128129
if ctx.Verbose {
129130
if err == nil {
130131
logger.Println(constants.LOG_LEVEL_INFO, constants.MSG_ARCHIVING_CORE_CACHE, targetArchivedCore)
131-
} else {
132+
} else if os.IsNotExist(err) {
132133
logger.Println(constants.LOG_LEVEL_INFO, constants.MSG_CORE_CACHE_UNAVAILABLE, ctx.ActualPlatform.PlatformId)
134+
} else {
135+
logger.Println(constants.LOG_LEVEL_INFO, constants.MSG_ERROR_ARCHIVING_CORE_CACHE, targetArchivedCore, err)
133136
}
134137
}
135138
}

0 commit comments

Comments
 (0)