fix: use exec.LookPath instead of 'command -v' for binary detection
'command' is a shell builtin, not a real binary, so exec.Command always failed with exit 127. Replaced with os/exec.LookPath which correctly resolves binaries in PATH. Also adds capabilities_test.go to verify Probe() matches exec.LookPath results. Version: 0.7.2
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
BINARY=nasctl
|
||||
VERSION?=0.7.1
|
||||
VERSION?=0.7.2
|
||||
GO?=go
|
||||
LDFLAGS=-s -w -X github.com/darroyo/nasctl/internal/web.Version=$(VERSION) -X github.com/darroyo/nasctl/internal/web.Commit=$(shell git rev-parse --short HEAD 2>/dev/null || echo unknown)
|
||||
BUILD_FLAGS=CGO_ENABLED=0
|
||||
|
||||
Reference in New Issue
Block a user