Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions cmd.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,17 @@ newlines, like $(cmd) would in a shell.

By default stderr is discarded."
(chomp
(with-output-to-string (s)
(multiple-value-call #'cmd
cmd
:output s
(values-list args)
:error-output nil))))
(multiple-value-bind (proc tokens args)
(multiple-value-call #'cmd&
cmd
:output :stream
(values-list args)
:error-output nil)
(let ((output (uiop:slurp-stream-string (uiop:process-info-output proc))))
(await proc
:ignore-error-status (getf args :ignore-error-status)
:tokens tokens)
output))))

(-> cmd? (&rest t) (values boolean integer &optional))
(define-cmd-variant cmd? (cmd &rest args)
Expand Down