From 567ba5e85e0b267e975eba0dc2a1b482e1968d94 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Mon, 24 Nov 2025 21:22:01 -0800 Subject: feat(utilities): Error check executable path --- internal/yae/utilities.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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...) -- cgit v1.2.3