zlh-agent/internal/provision/devcontainer/node/verify.go

23 lines
405 B
Go

package node
import (
"fmt"
"os/exec"
"zlh-agent/internal/state"
)
func Verify(cfg state.Config) error {
// Version is optional at verify-time; existence is authoritative
if _, err := exec.LookPath("node"); err != nil {
return fmt.Errorf("node binary not found in PATH")
}
if _, err := exec.LookPath("npm"); err != nil {
return fmt.Errorf("npm binary not found in PATH")
}
return nil
}