mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-12-24 12:25:28 -07:00
b966ca6627
* Add `rogpeppe/go-internal` as a dependency * Create `exec.Exec` function * Create asdf exec command * Address linter warnings
13 lines
349 B
Go
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)
|
|
}
|