aboutsummaryrefslogtreecommitdiff
path: root/command.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2021-04-04 05:35:50 +0700
committerShulhan <ms@kilabit.info>2021-04-04 05:36:11 +0700
commita79aeccc6bbdbb93cfcc59930e90af35aa993dab (patch)
treee696b7e476f7991da8e85f9cab95b0c939bb1216 /command.go
parent6770cd3062f8d3a23213eb95dd05cbc5bb03a26c (diff)
downloadawwan-a79aeccc6bbdbb93cfcc59930e90af35aa993dab.tar.xz
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.
Diffstat (limited to 'command.go')
-rw-r--r--command.go2
1 files changed, 1 insertions, 1 deletions
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)
}