diff --git a/command/run.go b/command/run.go index 7646193..1b7ec11 100644 --- a/command/run.go +++ b/command/run.go @@ -32,9 +32,6 @@ func CmdRun(c *cli.Context) { CheckUpdate(c) follow := ContainsFollow(c) command, extraArgs := getCommand(c, follow) - if !follow && command.Follow { - follow = command.Follow - } hosts := getHosts(c, follow) var confirmation string if command.RequiresConfirmation { @@ -64,6 +61,9 @@ func CmdRun(c *cli.Context) { cmd = fmt.Sprintf("cd %s && %s", workingDir, cmd) } } + if !follow && command.Follow { + follow = command.Follow + } go ssh(sshConfig, host, cmd, follow, ch) } outputs := make([]execOutput, 0, len(hosts))