diff options
| author | Shulhan <ms@kilabit.info> | 2023-12-14 20:23:19 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2023-12-14 20:23:47 +0700 |
| commit | 7c3b034fc45beac1da465984117d5948110c84e3 (patch) | |
| tree | 80e1e3b10aeaf919f3713b96047270b04fa09114 /session.go | |
| parent | 708919bfb67398ca6d0464553faf10aadc28893b (diff) | |
| download | awwan-7c3b034fc45beac1da465984117d5948110c84e3.tar.xz | |
all: make the magic line "#local" works on "local" command too
In case we have a script that manage local host and remote server,
calling "play" on "#local" lines only always open the connection to remote
server.
To minimize opening unused connections, let the "#local" command works
on both commands. Its up to user which part of lines that they want
to execute on remote or local.
Diffstat (limited to 'session.go')
| -rw-r--r-- | session.go | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -472,6 +472,8 @@ func (ses *Session) executeScriptOnLocal(req *ExecRequest, pos linePosition) (er err = ExecLocal(req, stmt) case statementKindGet: err = ses.Copy(req, stmt) + case statementKindLocal: + err = ExecLocal(req, stmt) case statementKindPut: err = ses.Copy(req, stmt) case statementKindSudoGet: |
