properly handle error

This commit is contained in:
Shane C 2024-07-04 17:16:13 -04:00
parent be8fd4ca55
commit 368b99ecfa
Signed by: shane
GPG key ID: E46B5FEA35B22FF9
2 changed files with 3 additions and 3 deletions

View file

@ -54,7 +54,7 @@ func (cmd *LinuxCommand) Run() error {
if exitErr.ExitCode() == 127 { if exitErr.ExitCode() == 127 {
return ErrCommandNotFound return ErrCommandNotFound
} else { } else {
return fmt.Errorf("%w: %w", ErrRunningCmd, err) return fmt.Errorf("%s: %w", ErrRunningCmd.Error(), err)
} }
} }
} }
@ -66,7 +66,7 @@ func (cmd *LinuxCommand) Run() error {
if exitErr.ExitCode() == 127 { if exitErr.ExitCode() == 127 {
return ErrCommandNotFound return ErrCommandNotFound
} else { } else {
return fmt.Errorf("%w: %w", ErrRunningCmd, err) return fmt.Errorf("%s: %w", ErrRunningCmd.Error(), err)
} }
} }
} }

View file

@ -1,4 +1,4 @@
package main package shell
import ( import (
"bytes" "bytes"