Browse Source

feat: Add env

update-packer-186
Bo-Yi Wu 7 years ago
parent
commit
3965960661
  1. 5
      plugin.go

5
plugin.go

@ -133,12 +133,11 @@ func (p *Plugin) Exec() error {
for _, c := range commands {
c.Stdout = os.Stdout
c.Stderr = os.Stderr
c.Env = os.Environ()
err := c.Run()
if err != nil {
logrus.WithFields(logrus.Fields{
"error": err,
}).Fatal("Failed to execute a command")
return err
}
logrus.Debug("Command completed successfully")
}

Loading…
Cancel
Save