2025-04-09 23:27:46 +05:30
|
|
|
package utils
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"fmt"
|
|
|
|
|
"os/exec"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func GetInterpreterPath(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
|
|
|
|
|
}
|