From 7eadfa1c66fc78d3e4805ad248fe05be1174cb0c Mon Sep 17 00:00:00 2001 From: ckonstanski Date: Wed, 2 Jul 2025 06:14:07 -0600 Subject: adding return code to shell-wrapper output values --- src/core.lisp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') 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 -- cgit v1.3