Skip to content

Commit bf68be3

Browse files
committed
panic'ing instead of keeping on with mess
1 parent 4a82831 commit bf68be3

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Diff for: legacy/builder/wipeout_build_path_if_build_options_changed.go

+1-4
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ package builder
1818
import (
1919
"encoding/json"
2020
"path/filepath"
21-
"os"
2221

23-
"github.com/arduino/arduino-cli/cli/errorcodes"
2422
"github.com/arduino/arduino-cli/legacy/builder/builder_utils"
2523
"github.com/arduino/arduino-cli/legacy/builder/constants"
2624
"github.com/arduino/arduino-cli/legacy/builder/types"
@@ -43,8 +41,7 @@ func (s *WipeoutBuildPathIfBuildOptionsChanged) Run(ctx *types.Context) error {
4341

4442
var opts *properties.Map
4543
if err := json.Unmarshal([]byte(buildOptionsJson), &opts); err != nil || opts == nil {
46-
ctx.GetLogger().Println(constants.LOG_LEVEL_DEBUG, constants.MSG_BUILD_OPTIONS_INVALID, constants.BUILD_OPTIONS_FILE)
47-
os.Exit(errorcodes.ErrGeneric)
44+
panic(constants.BUILD_OPTIONS_FILE + " is invalid")
4845
}
4946

5047
var prevOpts *properties.Map

0 commit comments

Comments
 (0)