summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorckonstanski <carlos.konstanski@olo.com>2025-07-02 06:14:07 -0600
committerckonstanski <carlos.konstanski@olo.com>2025-07-02 06:14:07 -0600
commit7eadfa1c66fc78d3e4805ad248fe05be1174cb0c (patch)
tree9a709186f92de6644cd7dad5c11342cb0fde8ad4 /src
parent2e03e8c150698b0f735a327933f139a93e18f682 (diff)
adding return code to shell-wrapper output values
Diffstat (limited to 'src')
-rw-r--r--src/core.lisp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core.lisp b/src/core.lisp
index 0689187..862c179 100644
--- a/src/core.lisp
+++ b/src/core.lisp
@@ -178,11 +178,11 @@ make it the specified length."
(defun shell-wrapper (command)
"Calls a shell command and returns the output as a list, where each
atom of the list is a string that contains one line of the output."
- (let ((output (make-array '(0) :element-type 'character :fill-pointer 0 :adjustable t)))
+ (let ((output (make-array '(0) :element-type 'character :fill-pointer 0 :adjustable t))
+ return-code)
(with-output-to-string (stream output)
- (uffi:run-shell-command command :output stream))
- (loop for line in (ppcre:split #\Newline output)
- collect line)))
+ (setf return-code (uffi:run-shell-command command :output stream)))
+ (values (ppcre:split #\Newline output) return-code)))
(defmacro sendmail (mail-server from to subject message &key display-name reply-to html-message authentication ssl attachments)
"Wrapper around `cl-smtp:send-email'. `attachments' needs to be a