aboutsummaryrefslogtreecommitdiff
path: root/wiene.go
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-10-11 03:49:21 +0000
committerFuwn <[email protected]>2024-10-11 03:49:21 +0000
commit7e49fed62cf5419c64f123cfdd35f7cc36ec474e (patch)
tree7d08503c19b6ea62f63c3745af7f3f6ad6a31eba /wiene.go
parentrefactor: reorder subcommands (diff)
downloadyae-7e49fed62cf5419c64f123cfdd35f7cc36ec474e.tar.xz
yae-7e49fed62cf5419c64f123cfdd35f7cc36ec474e.zip
refactor(wiene.go): use LookPath on executable name
Diffstat (limited to 'wiene.go')
-rw-r--r--wiene.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/wiene.go b/wiene.go
index 2d5ac49..23cc8cf 100644
--- a/wiene.go
+++ b/wiene.go
@@ -179,7 +179,9 @@ func fetchSHA256(uri string, unpack bool) (string, error) {
}
func commandOutput(name string, args ...string) (string, error) {
- cmd := exec.Command(name, args...)
+ executable, err := exec.LookPath(name)
+
+ cmd := exec.Command(executable, args...)
cmd.Stdin = os.Stdin
cmd.Stderr = os.Stderr
out, err := cmd.Output()