emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/zuul 58af096228 04/17: Update output to contain cmd as


From: ELPA Syncer
Subject: [elpa] externals/zuul 58af096228 04/17: Update output to contain cmd as well
Date: Tue, 30 Aug 2022 11:58:24 -0400 (EDT)

branch: externals/zuul
commit 58af0962289c3c9ec5628f72e88f92ef40753632
Author: Niklas Eklund <niklas.eklund@posteo.net>
Commit: Niklas Eklund <niklas.eklund@posteo.net>

    Update output to contain cmd as well
---
 zuul.el | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/zuul.el b/zuul.el
index ec08e58f24..cef94215f0 100644
--- a/zuul.el
+++ b/zuul.el
@@ -764,12 +764,20 @@ Optionally provide extra parameters PARAMS, PARSER, 
METHOD, BUFFER or HEADERS."
                    (seq-remove #'null)))))
 
 (defun zuul--build-host-output (host)
-  "Return the output from the HOST."
+  "Return the command and its output from the HOST."
   (pcase-let* ((`(,_hostname . ,data) host)
+               (cmd (let-alist data .cmd))
                (output (let-alist data .stdout))
                (host-id (let-alist data .zuul_log_id))
                (zuul--build-data `(,@zuul--build-data :host ,host)))
-    (when (and output (not (string-empty-p output)))
+    (when-let ((cmd-str
+                (when cmd
+                  (if (stringp cmd)
+                      cmd
+                    (mapconcat #'identity cmd " ")))))
+      (if (or (null output) (string-empty-p output))
+          (setq output (concat "$ " cmd-str "\n"))
+        (setq output (concat "$ " cmd-str "\n" output "\n")))
       (put-text-property 0 (length output) 'zuul-playbook 
zuul--build-playbook-id output)
       (put-text-property 0 (length output) 'zuul-play zuul--build-play-id 
output)
       (put-text-property 0 (length output) 'zuul-task zuul--build-task-id 
output)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]