mirror of https://github.com/docker/docs.git
Fix bug SSH interactive mode
Commit b44db20
introduced a bug that broke
the SSH interactive mode. If no command is
provided, Driver.GetSSHCommand is called with
an empty string instead of no parameter.
Signed-off-by: Guillaume Giamarchi <guillaume.giamarchi@gmail.com>
This commit is contained in:
parent
477fffb1ba
commit
6c5da2bc0e
|
@ -4,6 +4,7 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
"os/exec"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
"text/tabwriter"
|
"text/tabwriter"
|
||||||
|
@ -373,7 +374,12 @@ var Commands = []cli.Command{
|
||||||
os.Exit(1)
|
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 {
|
if err != nil {
|
||||||
log.Errorf("%s", err)
|
log.Errorf("%s", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
|
|
Loading…
Reference in New Issue