Skip to content

Commit b7fc37e

Browse files
committed
Fix error handling when there is no robot-specs config file
1 parent a14022c commit b7fc37e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

internal/simctl/robot_specs.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ func (r *RobotSpecSetter) LoadRobotSpecs(configFile string) {
4949
data, err := ioutil.ReadFile(configFile)
5050
if err != nil {
5151
log.Println("Could not read robot spec file: ", err)
52-
}
53-
if err := yaml.Unmarshal(data, &r.teamRobotSpecs); err != nil {
52+
} else if err := yaml.Unmarshal(data, &r.teamRobotSpecs); err != nil {
5453
log.Println("Could not unmarshal robot spec file: ", err)
5554
}
5655
r.appliedTeams = map[referee.Team]string{}

0 commit comments

Comments
 (0)