diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-03-21 17:39:13 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-03-21 17:39:13 -0700 |
commit | 57420310bcd4299ec4da463b9119012d6aa3dd3f (patch) | |
tree | 68f7e94faf6290ccf37c2ac46c525343b5d1746e /src/connection | |
parent | 8ba03fdbc12ba07021785c7bd52f2be387b76693 (diff) | |
download | consfigurator-57420310bcd4299ec4da463b9119012d6aa3dd3f.tar.gz |
:DEBIAN-SBCL connection: tidy up output
- When there's an error, avoid printing passphrases.
- Use INFORM and WITH-INDENTED-INFORM.
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/connection')
-rw-r--r-- | src/connection/debian-sbcl.lisp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/connection/debian-sbcl.lisp b/src/connection/debian-sbcl.lisp index 0bfc039..c5daa5e 100644 --- a/src/connection/debian-sbcl.lisp +++ b/src/connection/debian-sbcl.lisp @@ -24,15 +24,18 @@ (upload-all-prerequisite-data) (inform t "Waiting for remote Lisp to exit, this may take some time ... ") (force-output) - (let ((program (continue-deploy*-program remaining))) + (multiple-value-bind (program forms) + (continue-deploy*-program remaining) (multiple-value-bind (out err exit) (run :may-fail :input program "sbcl" "--noinform" "--noprint" "--disable-debugger" "--no-sysinit" "--no-user-init") - (format t "done.") - (if (zerop exit) - (format t " Output was:~%~{ ~A~%~}" (lines out)) - (error "~%~%Remote Lisp failed; we sent~%~%~A~%~%and stderr was:~%~A" - program err)))) + (inform t "done." :fresh-line nil) + (unless (zerop exit) + ;; print FORMS not PROGRAM because latter might contain sudo passwords + (error "~%~%Remote Lisp failed; we sent~%~%~A~%~%and stderr was:~%~A" + forms err)) + (inform t " Output was:" :fresh-line nil) + (with-indented-inform (inform t (lines out))))) nil) |