Spaces:
Sleeping
Sleeping
Download landrun-main/internal/exec/runner.go from Speedofmastery/HMM: direct link, hf CLI and curl.
- Browser
- Download file 408 Bytes
-
https://huggingface.co/spaces/Speedofmastery/HMM/resolve/main/landrun-main/internal/exec/runner.go
- Command line
-
hf download hf://spaces/Speedofmastery/HMM/landrun-main/internal/exec/runner.go
-
curl -L -o runner.go https://huggingface.co/spaces/Speedofmastery/HMM/resolve/main/landrun-main/internal/exec/runner.go
408 Bytes
| package exec | |
| import ( | |
| "os/exec" | |
| "syscall" | |
| "github.com/zouuup/landrun/internal/log" | |
| ) | |
| func Run(args []string, env []string) error { | |
| binary, err := exec.LookPath(args[0]) | |
| if err != nil { | |
| return err | |
| } | |
| log.Info("Executing: %v", args) | |
| // Only pass the explicitly specified environment variables | |
| // If env is empty, no environment variables will be passed | |
| return syscall.Exec(binary, args, env) | |
| } | |