diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-02-22 14:29:39 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-02-22 14:29:39 -0700 |
commit | 2cafe2e1273f41801471edfd3d0a4da523846421 (patch) | |
tree | 6528700b23cb44d4bfd082e35a040435b7b3108a | |
parent | 7ce5dcdcf751cdef990b933e7ee6347775e8f503 (diff) | |
download | consfigurator-2cafe2e1273f41801471edfd3d0a4da523846421.tar.gz |
fix :SSH CONNECTION-RUN
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r-- | src/connection.lisp | 6 | ||||
-rw-r--r-- | src/connection/ssh.lisp | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/connection.lisp b/src/connection.lisp index b593999..3d09124 100644 --- a/src/connection.lisp +++ b/src/connection.lisp @@ -71,9 +71,9 @@ be emptied into the shell command's stdin. Implementations can specialise on both the CONNECTION and INPUT arguments, if they need to handle streams and strings differently. -Returns (values OUT EXIT) where OUT is merged stdout and stderr and EXIT is -the exit code. Should not signal any error condition just because EXIT is -non-zero.")) +Returns (values OUT EXIT) where OUT is either merged stdout and stderr or +stderr followed by stdout, and EXIT is the exit code. Should not signal any +error condition just because EXIT is non-zero.")) (defmethod connection-run :around ((connection connection) cmd &optional input) (declare (ignore cmd input)) diff --git a/src/connection/ssh.lisp b/src/connection/ssh.lisp index 21b40b8..be5afa6 100644 --- a/src/connection/ssh.lisp +++ b/src/connection/ssh.lisp @@ -51,7 +51,9 @@ (if (cdr args) (escape-sh-command args) (car args))))))) (defmethod connection-run ((c ssh-connection) cmd &optional input) - (run :input input (sshcmd c cmd))) + (multiple-value-bind (out err exit) + (run :input input (sshcmd c cmd)) + (values (strcat err out) exit))) (defmethod connection-readfile ((c ssh-connection) path) (multiple-value-bind (output error-code) |