@@ -45,7 +45,7 @@ func task(parseFlags bool, c chan int) func(cmd *cobra.Command, args []string) e
45
45
}
46
46
err := worker .PayloadFromJSON (& p )
47
47
if err != nil {
48
- fmt .Printf ( "[siderite] failed to read payload from JSON: %v\n " , err )
48
+ _ , _ = fmt .Fprintf ( os . Stderr , "[siderite] failed to read payload from JSON: %v\n " , err )
49
49
return err
50
50
}
51
51
@@ -58,20 +58,20 @@ func task(parseFlags bool, c chan int) func(cmd *cobra.Command, args []string) e
58
58
defer deferFunc ()
59
59
}
60
60
if err != nil {
61
- fmt .Printf ( "[siderite] logger disabled: %v\n " , err )
61
+ _ , _ = fmt .Fprintf ( os . Stderr , "[siderite] logger disabled: %v\n " , err )
62
62
}
63
63
64
64
_ , _ = fmt .Fprintf (os .Stderr , "[siderite] task version %s start\n " , GitCommit )
65
65
66
66
if len (p .Version ) < 1 || p .Version != "1" {
67
- fmt .Printf ( "[siderite] unsupported or unknown payload version: %s\n " , p .Version )
67
+ _ , _ = fmt .Fprintf ( os . Stderr , "[siderite] unsupported or unknown payload version: %s\n " , p .Version )
68
68
}
69
69
if len (p .Cmd ) < 1 {
70
- fmt .Printf ( "[siderite] missing command\n " )
70
+ _ , _ = fmt .Fprintf ( os . Stderr , "[siderite] missing command\n " )
71
71
return fmt .Errorf ("missing command" )
72
72
}
73
73
74
- fmt .Printf ( "[siderite] executing: %s %v\n " , p .Cmd [0 ], p .Cmd [1 :])
74
+ _ , _ = fmt .Fprintf ( os . Stderr , "[siderite] executing: %s %v\n " , p .Cmd [0 ], p .Cmd [1 :])
75
75
command := exec .Command (p .Cmd [0 ], p .Cmd [1 :]... )
76
76
command .Stdout = os .Stdout
77
77
command .Stderr = os .Stderr
0 commit comments