Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0a73399

Browse files
return different exit codes in the compile command
1 parent 225c5bf commit 0a73399

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎internal/cli/compile/compile.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ func runCompileCommand(cmd *cobra.Command, args []string) {
166166

167167
sk, err := sketch.LoadSketch(context.Background(), &rpc.LoadSketchRequest{SketchPath: sketchPath.String()})
168168
if err != nil {
169-
feedback.FatalError(err, feedback.ErrGeneric)
169+
feedback.FatalError(err, feedback.ErrSketchError)
170170
}
171171
fqbn, port := arguments.CalculateFQBNAndPort(&portArgs, &fqbnArg, inst, sk.GetDefaultFqbn(), sk.GetDefaultPort(), sk.GetDefaultProtocol())
172172

@@ -269,7 +269,7 @@ func runCompileCommand(cmd *cobra.Command, args []string) {
269269
}
270270

271271
if err := upload.Upload(context.Background(), uploadRequest, stdOut, stdErr); err != nil {
272-
feedback.Fatal(tr("Error during Upload: %v", err), feedback.ErrGeneric)
272+
feedback.Fatal(tr("Error during Upload: %v", err), feedback.ErrBoardUpload)
273273
}
274274
}
275275

@@ -366,7 +366,7 @@ func runCompileCommand(cmd *cobra.Command, args []string) {
366366
}
367367
}
368368
}
369-
feedback.FatalResult(res, feedback.ErrGeneric)
369+
feedback.FatalResult(res, feedback.ErrCompilation)
370370
}
371371
feedback.PrintResult(res)
372372
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /