From a79aeccc6bbdbb93cfcc59930e90af35aa993dab Mon Sep 17 00:00:00 2001 From: Shulhan Date: Sun, 4 Apr 2021 05:35:50 +0700 Subject: all: do not load SSH config if command mode is "local" If the mode is local there is no need to parse and load the SSH config, since the command to be executed will run on local machine anyway. --- command.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'command.go') diff --git a/command.go b/command.go index 74eaae3..e803a93 100644 --- a/command.go +++ b/command.go @@ -64,7 +64,7 @@ func NewCommand(mode, scriptPath string, startAt, endAt int) (cmd *Command, err scriptEnd: endAt, } - cmd.env, err = newEnvironment(scriptPath) + cmd.env, err = newEnvironment(mode, scriptPath) if err != nil { return nil, fmt.Errorf("%s: %w", logp, err) } -- cgit v1.3-5-g9baa