Skip to content

Commit

Permalink
cluster: improved error for missing tar (#2499)
Browse files Browse the repository at this point in the history
* cluster: improved error for missing tar

* fixup

* update message, based on review
  • Loading branch information
dveeden authored Jan 22, 2025
1 parent 0791a28 commit 8e15a03
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/cluster/task/install_package.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
package task

import (
"bytes"
"context"
"fmt"
"path"
Expand Down Expand Up @@ -51,6 +52,9 @@ func (c *InstallPackage) Execute(ctx context.Context) error {

_, stderr, err := exec.Execute(ctx, cmd, false)
if err != nil {
if bytes.Contains(stderr, []byte("command not found")) {
return errors.Errorf("tar command was not found on %s, please install it", c.host)
}
return errors.Annotatef(err, "stderr: %s", string(stderr))
}
return nil
Expand Down

0 comments on commit 8e15a03

Please sign in to comment.