The script.Exec contains this code
args, err := shell.Fields(cmdLine, nil)
if err != nil {
return err
}
that already evaluates the env variables, but nil is passed in. So the variables are evaluated as empty string.
https://go.dev/play/p/P73IM0NLNBv
Or am I using it wrong?