This repository was archived by the owner on Apr 30, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +12
-4
lines changed Expand file tree Collapse file tree 4 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,9 @@ const (
2525 jqfSuccessExitCode = 0
2626
2727 fuzzingInterval = 3600
28+
29+ AgentGeneralError = 1
30+ AgentNoPermissionError = 22
2831)
2932
3033func libFuzzerExitCodeToStatus (exitCode int ) string {
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import (
1111)
1212
1313const FuzzitEndpoint = "https://app.fuzzit.dev"
14- const Version = "v2.4.54 "
14+ const Version = "v2.4.55 "
1515
1616type Target struct {
1717 Name string `firestore:"target_name"`
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ var jobCmd = &cobra.Command{
7575
7676 if newJob .Type == "local-regression" {
7777 err = gFuzzitClient .CreateLocalJob (newJob , args [1 :])
78- if err != nil && skipIfNotExist && err .Error () == "401 Unauthorized" {
78+ if err != nil && skipIfNotExist && ( err .Error () == "401 Unauthorized" || err . Error () == "fuzzer exited with 22" ) {
7979 log .Println ("Target doesn't exist yet. skipping..." )
8080 return
8181 }
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import (
2020 "github.com/fuzzitdev/fuzzit/v2/client"
2121 "github.com/spf13/cobra"
2222 "log"
23+ "os"
2324)
2425
2526var runJob = client.Job {}
@@ -44,9 +45,13 @@ var runCmd = &cobra.Command{
4445 }
4546
4647 err = gFuzzitClient .RunFuzzer (runJob , jobId , updateDB )
47-
4848 if err != nil {
49- log .Fatalln (err )
49+ log .Println (err )
50+ if err .Error () == "401 Unauthorized" {
51+ os .Exit (client .AgentNoPermissionError )
52+ } else {
53+ os .Exit (client .AgentGeneralError )
54+ }
5055 }
5156 },
5257 Hidden : true ,
You can’t perform that action at this time.
0 commit comments