From 58bcd1fa4a00c35492d6886c0f729974e7028136 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Thu, 15 Jul 2021 13:50:34 -0700 Subject: MKTEMP: avoid returning an empty string m4(1) can exit zero but fail to create a temporary file. Signed-off-by: Sean Whitton --- src/connection.lisp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/connection.lisp') diff --git a/src/connection.lisp b/src/connection.lisp index b2b0cac..7dbe5d3 100644 --- a/src/connection.lisp +++ b/src/connection.lisp @@ -289,7 +289,7 @@ which will be cleaned up when BODY is finished." #?"umask 077; echo 'mkstemp(${template})' 2>/dev/null | m4 2>/dev/null || mktemp '${template}'" nil) (let ((lines (lines out))) - (if (and (zerop exit) lines) + (if (and (zerop exit) lines (plusp (length (car lines)))) (car lines) (error 'run-failed :cmd "(attempt to make a temporary file on remote)" -- cgit v1.2.3