Skip to content

Commit 34848e2

Browse files
authored
log and exit if programmer is not specified correctly (#15)
1 parent 411427f commit 34848e2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: modules/nina/main.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ func Run(ctx context.Context) {
4343

4444
if strings.Contains(filepath.Base(ctx.ProgrammerPath), "bossac") {
4545
programmer = &bossac.Bossac{}
46-
}
47-
if strings.Contains(filepath.Base(ctx.ProgrammerPath), "avrdude") {
46+
} else if strings.Contains(filepath.Base(ctx.ProgrammerPath), "avrdude") {
4847
programmer = &avrdude.Avrdude{}
48+
} else {
49+
log.Fatal("Programmer path not specified correctly, programmer path set to: " + ctx.ProgrammerPath)
4950
}
5051

5152
if ctx.FWUploaderBinary != "" {

0 commit comments

Comments
 (0)