Fix channel initialization
This commit is contained in:
@@ -291,10 +291,10 @@ func (p *pwd) SessionSetup(session *types.Session, sconf SessionSetupConf) error
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, cmd := range conf.Run {
|
for _, cmd := range conf.Run {
|
||||||
var errch chan error
|
errch := make(chan error)
|
||||||
go func() {
|
go func() {
|
||||||
exitCode, err := p.InstanceExec(i, cmd)
|
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 {
|
if err != nil {
|
||||||
errch <- err
|
errch <- err
|
||||||
|
|||||||
Reference in New Issue
Block a user