add env options
This commit is contained in:
parent
bde6ae681e
commit
992dd14272
1 changed files with 4 additions and 0 deletions
|
@ -69,6 +69,10 @@ func (cmd *LinuxCommand) Run() error {
|
||||||
command := exec.Command(cmd.Options.Shell, "-c", sourceCommand.String()+cmd.Options.Command+commandOptions.String())
|
command := exec.Command(cmd.Options.Shell, "-c", sourceCommand.String()+cmd.Options.Command+commandOptions.String())
|
||||||
command.Dir = cmd.Options.Cwd
|
command.Dir = cmd.Options.Cwd
|
||||||
|
|
||||||
|
for key, value := range cmd.Options.Env {
|
||||||
|
command.Env = append(command.Env, fmt.Sprintf("%s=%s", key, value))
|
||||||
|
}
|
||||||
|
|
||||||
var signalChannel chan os.Signal
|
var signalChannel chan os.Signal
|
||||||
|
|
||||||
if len(cmd.handlers) != 0 {
|
if len(cmd.handlers) != 0 {
|
||||||
|
|
Loading…
Reference in a new issue