Merge pull request #101 from ggiamarchi/fix-interactive-ssh

Fix bug SSH interactive mode
This commit is contained in:
Ben Firshman 2014-12-15 17:52:53 +00:00
commit e401c4464c
1 changed files with 7 additions and 1 deletions

View File

@ -4,6 +4,7 @@ import (
"encoding/json"
"fmt"
"os"
"os/exec"
"strings"
"sync"
"text/tabwriter"
@ -373,7 +374,12 @@ var Commands = []cli.Command{
os.Exit(1)
}
sshCmd, err := host.Driver.GetSSHCommand(c.String("command"))
var sshCmd *exec.Cmd
if c.String("command") == "" {
sshCmd, err = host.Driver.GetSSHCommand()
} else {
sshCmd, err = host.Driver.GetSSHCommand(c.String("command"))
}
if err != nil {
log.Errorf("%s", err)
os.Exit(1)