Skip to content

Commit 454ef39

Browse files
committed
Minor fix. Added "gotchas" for "interactive mode" into README.
1 parent c5b66e9 commit 454ef39

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ func main() {
9090
}
9191
```
9292

93+
## Known gotchas
94+
95+
There is some funny backslash escaping with the `interactive` mode. This is due to the way the library `github.com/nproc/parseargs-go` handles escaping of backslashes. So if you for instance run psexec with `psexec \\mymachine` it will escape the double backslash into a single.
96+
9397
## TODO
9498

9599
- Unit Tests

server/handle_exec.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,11 @@ func (h *handler) handleExecFunc(c *echo.Context) error {
4949
return err
5050
}
5151

52-
return streamer.ExecAndWait()
52+
err = streamer.ExecAndWait()
53+
if err != nil {
54+
h.logger.Warningf("Unable to execute command, error was: %s", err.Error())
55+
return err
56+
}
57+
58+
return nil
5359
}

0 commit comments

Comments
 (0)