From 229bd52e31f6cb5b195f5615b8a585a7583b3ce6 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sat, 6 Mar 2021 13:54:20 -0700 Subject: MKTEMP needs to check for presence of output, not just zero exit Signed-off-by: Sean Whitton --- src/connection.lisp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/connection.lisp') 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) -- cgit v1.2.3