Files
pmg/pkg/common/utils/interpreter.go
T
2025-04-23 01:12:26 +05:30

15 lines
258 B
Go

package utils
import (
"fmt"
"os/exec"
)
func GetExecutablePath(name string) (string, error) {
path, err := exec.LookPath(name)
if err != nil {
return "", fmt.Errorf("interpreter '%s' not found in PATH: %s", name, err.Error())
}
return path, nil
}