-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gexe.Envs Function doesn't work when multiple key/vals are passed as string #64
Comments
* Bumps gexe to 0.4.0 Additional fixes: - Fixes a bug in ssh.go where the retry logic did not work due to using StartProc instead of RunProc in the backoff callback - Fixes the ssh key setup on Mac where id_rsa private key was getting created with wrong permissions * Bumps checkout action version * Fix how we pass env vars to the ssh agent. See also vladimirvivien/gexe#64 --------- Co-authored-by: Marin Dzhigarov <[email protected]>
Hi @mdzhigarov the API's behavior changed in v0.4.1 to fix this. Instead of doing multiple declarations in one string, you add each declarations in separate strings as in: result := gexe.Envs("CGO_ENABLED=0", "GOOS=$os", "GOARCH=$arch").Run("go build -o $binpath .") See example here - https://github.com/vladimirvivien/gexe/blob/main/examples/build/main.go I see the |
Yep, I realized that but the readme needs a bit of tweaking. Also it'd be good to update the godocs comment inside the functions.go code above Env |
There is an example in the README of how to use the gexe.Envs function:
It looks like the parser doesn't work as expected.
gexe.Envs("CGO_ENABLED=0 GOOS=$os GOARCH=$arch") is not parsed correctly and it looks like the the 3 environment variables are not being passed to the process at all. This can easily be proven by inspecting the vars := e.vars.Envs(variables...) after execution with the debugger.
The text was updated successfully, but these errors were encountered: