Skip to content

Commit

Permalink
fix: Workaround with post args
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Oct 25, 2024
1 parent c4cd87a commit ac6e4fc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/utils.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
(defun extract-post-arguments (cmd)
"Extract arguments after two dashes `--' from CMD."
(let ((args (clingon:command-arguments cmd))
(pattern "--"))
(pattern "-"))
(setq args (remove-if-not (lambda (arg)
(string= pattern arg :end2 (length pattern)))
args))
Expand Down Expand Up @@ -150,13 +150,14 @@ Argument CMD is used to extract positional arguments and options."
args)))
(when (<= 5 (verbose cmd))
(format t "~A~%" command))
(run-program command cmd))))
(run-program command cmd t))))

(defun run-program (command cmd)
(defun run-program (command cmd &optional no-post-args)
"Return COMMAND program."
(uiop:run-program (concatenate 'list
command
(extract-post-arguments cmd))
(if no-post-args '()
(extract-post-arguments cmd)))
:output :interactive
:error-output :interactive
:force-shell t))
Expand Down

0 comments on commit ac6e4fc

Please sign in to comment.