Skip to content

Commit 922eb68

Browse files
committed
fix per review
1 parent eb10ff4 commit 922eb68

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

legacy/builder/wipeout_build_path_if_build_options_changed.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,10 @@ func (s *WipeoutBuildPathIfBuildOptionsChanged) Run(ctx *types.Context) error {
4040
previousBuildOptionsJson := ctx.BuildOptionsJsonPrevious
4141

4242
var opts *properties.Map
43-
var prevOpts *properties.Map
4443
json.Unmarshal([]byte(buildOptionsJson), &opts)
45-
json.Unmarshal([]byte(previousBuildOptionsJson), &prevOpts)
4644

47-
if prevOpts == nil {
45+
var prevOpts *properties.Map
46+
if err := json.Unmarshal([]byte(previousBuildOptionsJson), &prevOpts); err != nil || prevOpts == nil {
4847
ctx.GetLogger().Println(constants.LOG_LEVEL_DEBUG, constants.MSG_BUILD_OPTIONS_INVALID, constants.BUILD_OPTIONS_FILE)
4948
return doCleanup(ctx.BuildPath)
5049
}

0 commit comments

Comments
 (0)