From c965f117e904e0de494b6f2e64b0b66043b916fd Mon Sep 17 00:00:00 2001 From: Aliaksandr Kazlou Date: Fri, 4 May 2018 23:35:06 +0300 Subject: [PATCH] #55 Add support for the follow key in the commands config --- command/run.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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))