File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ var Flags AgentCmdFlags
5050const schemaVersion string = "v2.0.0"
5151
5252// Run starts the agent process
53- func Run (cmd * cobra.Command , args []string ) error {
53+ func Run (cmd * cobra.Command , args []string ) ( returnErr error ) {
5454 logs .Log .Printf ("Preflight agent version: %s (%s)" , version .PreflightVersion , version .Commit )
5555 ctx , cancel := context .WithCancel (
5656 klog .NewContext (
@@ -85,8 +85,8 @@ func Run(cmd *cobra.Command, args []string) error {
8585 defer func () {
8686 cancel ()
8787 if groupErr := group .Wait (); groupErr != nil {
88- err = multierror .Append (
89- err ,
88+ returnErr = multierror .Append (
89+ returnErr ,
9090 fmt .Errorf ("failed to wait for controller-runtime component to stop: %v" , groupErr ),
9191 )
9292 }
You can’t perform that action at this time.
0 commit comments