Passing environment variables to external commands
breml opened this issue · comments
Lucas Bremgartner commented
I have an external command, that I would like to call from goyek, where I need to provide some environment variables (there is no way to substitute with e.g. flags for this) and I am wondering about the simplest way of doing this. I know about https://golang.org/pkg/os/exec, but to use this somehow removes the sweetness of short and concise task functions. Unfortunately neither goyek.Exec
nor script.Exec
(from github.com/bitfield/script) expose the environment variables.
What are your thoughts about this?
Lucas Bremgartner commented
OK, found it in your build.go, tf.Cmd
does the trick.