diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-03-06 13:54:20 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-03-06 13:54:20 -0700 |
commit | 229bd52e31f6cb5b195f5615b8a585a7583b3ce6 (patch) | |
tree | fd6fee9ecad9080c43d901ce91a9dba3fc9717c3 /src/connection.lisp | |
parent | 6e15e8f3d71236461477175221d5f8e05a1d0ced (diff) | |
download | consfigurator-229bd52e31f6cb5b195f5615b8a585a7583b3ce6.tar.gz |
MKTEMP needs to check for presence of output, not just zero exit
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/connection.lisp')
-rw-r--r-- | src/connection.lisp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/connection.lisp b/src/connection.lisp index eeda6e3..fb873a7 100644 --- a/src/connection.lisp +++ b/src/connection.lisp @@ -178,12 +178,14 @@ the root Lisp's machine. For example, using rsync(1) over SSH.")) connection "echo 'mkstemp('${TMPDIR:-/tmp}'/tmp.XXXXXX)' | m4 2>/dev/null || mktemp" nil) - (if (= exit 0) - (car (lines out)) - (error 'run-failed :cmd "(attempt to make a temporary file on remote)" - :stdout out - :stderr "(merged with stdout)" - :exit-code exit)))) + (let ((lines (lines out))) + (if (and (zerop exit) lines) + (car lines) + (error 'run-failed + :cmd "(attempt to make a temporary file on remote)" + :stdout out + :stderr "(merged with stdout)" + :exit-code exit))))) (defmacro %process-run-args (&body forms) `(let (cmd input may-fail for-exit env princ) |