Skip to content

Commit

Permalink
Fix error on copy run (#2237)
Browse files Browse the repository at this point in the history
  • Loading branch information
michalpristas authored Feb 8, 2023
1 parent 59c2dfc commit 237e608
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/pkg/agent/application/upgrade/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,11 @@ func copyRunDirectory(log *logger.Logger, newHash string) error {
log.Debugw("Run directory not present", "old_run_path", oldRunPath)
return nil
}
return errors.New(err, "failed to copy %q to %q", oldRunPath, newRunPath)
if err != nil {
return errors.New(err, "failed to copy %q to %q", oldRunPath, newRunPath)
}

return nil
}

// shutdownCallback returns a callback function to be executing during shutdown once all processes are closed.
Expand Down

0 comments on commit 237e608

Please sign in to comment.