|
@ -136,16 +136,21 @@ func (p *Plugin) Exec() error { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
for _, c := range commands { |
|
|
for _, cmd := range commands { |
|
|
c.Stdout = os.Stdout |
|
|
cmd.Stdout = os.Stdout |
|
|
c.Stderr = os.Stderr |
|
|
cmd.Stderr = os.Stderr |
|
|
c.Env = os.Environ() |
|
|
cmd.Env = os.Environ() |
|
|
|
|
|
|
|
|
err := c.Run() |
|
|
trace(cmd) |
|
|
if err != nil { |
|
|
|
|
|
|
|
|
if err := cmd.Run(); err != nil { |
|
|
return err |
|
|
return err |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return nil |
|
|
return nil |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func trace(cmd *exec.Cmd) { |
|
|
|
|
|
fmt.Println("$", strings.Join(cmd.Args, " ")) |
|
|
|
|
|
} |
|
|