Fix channel initialization

This commit is contained in:
marcos
2018-01-14 19:08:59 -03:00
parent 56379065ae
commit a9d36c580e

View File

@@ -291,10 +291,10 @@ func (p *pwd) SessionSetup(session *types.Session, sconf SessionSetupConf) error
}
for _, cmd := range conf.Run {
var errch chan error
errch := make(chan error)
go func() {
exitCode, err := p.InstanceExec(i, cmd)
fmt.Printf("Finished execuing command [%s] on instance %s with code [%d] and err [%v]", cmd, i.Name, exitCode, err)
fmt.Printf("Finished execuing command [%s] on instance %s with code [%d] and err [%v]\n", cmd, i.Name, exitCode, err)
if err != nil {
errch <- err