diff --git a/internal/pkg/agent/cmd/install.go b/internal/pkg/agent/cmd/install.go index 2057c8658f6..ee611e93d0a 100644 --- a/internal/pkg/agent/cmd/install.go +++ b/internal/pkg/agent/cmd/install.go @@ -7,7 +7,6 @@ package cmd import ( "errors" "fmt" - "io/fs" "os" "os/exec" "path/filepath" @@ -363,10 +362,6 @@ func execUninstall(streams *cli.IOStreams, topPath string, binName string) error binPath := filepath.Join(topPath, binName) fi, err := os.Stat(binPath) if err != nil { - if errors.Is(err, fs.ErrNotExist) { - return fmt.Errorf("unable to find %s on path: %w", binPath, err) - } - return fmt.Errorf("error checking binary path %s: %w", binPath, err) }