Merge pull request #4690 from mitchellh/sshfix

communicator/ssh: fix nil ptr error
This commit is contained in:
Matthew Hooker 2017-03-20 14:35:45 -07:00 committed by GitHub
commit b49f4253e9
1 changed files with 2 additions and 2 deletions

View File

@ -239,9 +239,9 @@ func (c *comm) newSession() (session *ssh.Session, err error) {
}
if c.client == nil {
err = errors.New("client not available")
return nil, errors.New("client not available")
} else {
session, err = c.client.NewSession()
return c.client.NewSession()
}
}