diff options
| author | Shulhan <ms@kilabit.info> | 2023-10-30 21:59:17 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2023-10-30 22:00:34 +0700 |
| commit | 209e9ddd1d49fd6b9384fa0dab27760480fba442 (patch) | |
| tree | bbf96f0073f71329b4913a38138b05199b9692a0 /awwan.go | |
| parent | a4df1481d6108731e231750721e4d2cfe0cee8bd (diff) | |
| download | awwan-209e9ddd1d49fd6b9384fa0dab27760480fba442.tar.xz | |
all: pass Request when creating new SSH client
Instead of passing stdout and stderr as "io.Writer", pass the Request,
so we can log using the Request mlog.
While at it, return error from sshClient rmdirAll so the caller can log
the error.
Diffstat (limited to 'awwan.go')
| -rw-r--r-- | awwan.go | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -284,7 +284,10 @@ func (aww *Awwan) Play(req *Request) (err error) { } out: if ses != nil && ses.sshc != nil { - ses.sshc.rmdirAll(ses.sshc.dirTmp) + var errRemove = ses.sshc.rmdirAll(ses.sshc.dirTmp) + if errRemove != nil { + req.mlog.Errf(`!!! %s`, errRemove) + } } if err != nil { req.mlog.Errf(`!!! %s`, err) |
