branch: externals/detached
commit 4a725e96fc82a1d4ed66c9768eb8d7bd714bd869
Author: Niklas Eklund <niklas.ekl...@posteo.net>
Commit: Niklas Eklund <niklas.ekl...@posteo.net>

    Make sure status deduction works on no output
---
 detached.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/detached.el b/detached.el
index e0a8f820e1..c8cabfaf7f 100644
--- a/detached.el
+++ b/detached.el
@@ -708,7 +708,8 @@ If session is not valid trigger an automatic cleanup on 
SESSION's host."
            (goto-char (point-max))
            (thing-at-point 'line t)))
         (failure-message (rx "detached-exit-code: " (group (one-or-more 
digit)))))
-    (cond ((string-match failure-message detached-env-message)
+    (cond ((null detached-env-message) `(success . 0))
+          ((string-match failure-message detached-env-message)
            `(failure . ,(string-to-number (match-string 1 
detached-env-message))))
           (t `(success . 0)))))
 

Reply via email to