diff options
| -rw-r--r-- | internal/yae/utilities.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/internal/yae/utilities.go b/internal/yae/utilities.go index 73042fd..f6fc32c 100644 --- a/internal/yae/utilities.go +++ b/internal/yae/utilities.go @@ -37,7 +37,12 @@ func FetchSRIHash(sha256 string) (string, error) { func command(name string, show bool, args ...string) (string, error) { executable, err := exec.LookPath(name) - out := []byte{} + + if err != nil { + return "", fmt.Errorf("command not found: %s", name) + } + + var out []byte if show { cmd := exec.Command(executable, args...) |