From a9d36c580ec94da1dacd2addf9f6ffef33f31a85 Mon Sep 17 00:00:00 2001 From: marcos Date: Sun, 14 Jan 2018 19:08:59 -0300 Subject: [PATCH] Fix channel initialization --- pwd/session.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pwd/session.go b/pwd/session.go index c820253..5e3ec20 100644 --- a/pwd/session.go +++ b/pwd/session.go @@ -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