This commit is contained in:
Michiel Borkent 2021-03-16 18:05:36 +01:00
parent 55f38db119
commit e0dd41d631
2 changed files with 8 additions and 4 deletions

View file

@ -510,7 +510,7 @@ Use -- to separate script command line args from bb command line args.
(cond cmd-line-args (cond cmd-line-args
(parse-opts (seq (map str (concat cmd-line-args command-line-args)))) (parse-opts (seq (map str (concat cmd-line-args command-line-args))))
proc {:exec (fn [] proc {:exec (fn []
(-> proc (p/process {:inherit true}) p/check) (-> (:args proc) (p/process {:inherit true}) p/check)
0)})) 0)}))
(error (str "No such task: " task) 1))) (error (str "No such task: " task) 1)))
(error (str "File does not exist: " task) 1)))) (error (str "File does not exist: " task) 1))))

View file

@ -1,3 +1,7 @@
{:tasks {:eval-plus {:babashka/args ["-e" "(+ 1 2 3)"]} {:tasks {:eval-plus {:babashka/args [-e (+ 1 2 3)]}
:tree {:babashka/args [":clojure" "-Stree"]} :tree {:babashka/args [:clojure -Stree]}
:count-files {:babashka/process ["bash" "-c" "ls | wc -l"] }}} :count-files {:babashka/process {:args [bash -c "ls | wc -l"]
,,,}}
:all {:babashka/args [:do :eval-plus
:do :tree
:do :count-files]}}}