Merge pull request #10213 from chrisroberts/vagrant-driv-stderr
Return error if ssh-config command fails
This commit is contained in:
commit
23552bfbd7
|
@ -154,8 +154,10 @@ func (d *Vagrant_2_2_Driver) SSHConfig(id string) (*VagrantSSHConfig, error) {
|
||||||
sshConf := &VagrantSSHConfig{}
|
sshConf := &VagrantSSHConfig{}
|
||||||
|
|
||||||
stdout, stderr, err := d.vagrantCmd(args...)
|
stdout, stderr, err := d.vagrantCmd(args...)
|
||||||
if stderr != "" {
|
if err != nil {
|
||||||
err := fmt.Errorf("ssh-config command returned error: %s", stderr)
|
if stderr != "" {
|
||||||
|
err = fmt.Errorf("ssh-config command returned errors: %s", stderr)
|
||||||
|
}
|
||||||
return sshConf, err
|
return sshConf, err
|
||||||
}
|
}
|
||||||
lines := strings.Split(stdout, "\n")
|
lines := strings.Split(stdout, "\n")
|
||||||
|
|
Loading…
Reference in New Issue