asdf/internal/exec/exec.go
Trevor Brown b966ca6627 feat(golang-rewrite): create asdf exec command
* Add `rogpeppe/go-internal` as a dependency
* Create `exec.Exec` function
* Create asdf exec command
* Address linter warnings
2024-12-18 11:32:02 -05:00

13 lines
349 B
Go

// Package exec handles replacing the asdf go process with
package exec
import (
"syscall"
)
// Exec invokes syscall.Exec to exec an executable. Requires an absolute path to
// executable.
func Exec(executablePath string, args []string, env []string) error {
return syscall.Exec(executablePath, append([]string{executablePath}, args...), env)
}