summaryrefslogtreecommitdiff
path: root/src/core.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core.lisp')
-rw-r--r--src/core.lisp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core.lisp b/src/core.lisp
index 862c179..fef1c53 100644
--- a/src/core.lisp
+++ b/src/core.lisp
@@ -178,11 +178,12 @@ 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))
- return-code)
+ (let ((output (make-array '(0) :element-type 'character :fill-pointer 0 :adjustable t)))
(with-output-to-string (stream output)
- (setf return-code (uffi:run-shell-command command :output stream)))
- (values (ppcre:split #\Newline output) return-code)))
+ (let ((return-code (uffi:run-shell-command command :output stream)))
+ (values (loop for line in (ppcre:split #\Newline output)
+ collect line)
+ 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