diff --git a/src/babashka/main.clj b/src/babashka/main.clj index 4517ddca..bd870ab7 100644 --- a/src/babashka/main.clj +++ b/src/babashka/main.clj @@ -510,7 +510,7 @@ Use -- to separate script command line args from bb command line args. (cond cmd-line-args (parse-opts (seq (map str (concat cmd-line-args command-line-args)))) proc {:exec (fn [] - (-> proc (p/process {:inherit true}) p/check) + (-> (:args proc) (p/process {:inherit true}) p/check) 0)})) (error (str "No such task: " task) 1))) (error (str "File does not exist: " task) 1)))) diff --git a/test-resources/bb.edn b/test-resources/bb.edn index 78fd5598..d2312b74 100644 --- a/test-resources/bb.edn +++ b/test-resources/bb.edn @@ -1,3 +1,7 @@ -{:tasks {:eval-plus {:babashka/args ["-e" "(+ 1 2 3)"]} - :tree {:babashka/args [":clojure" "-Stree"]} - :count-files {:babashka/process ["bash" "-c" "ls | wc -l"] }}} +{:tasks {:eval-plus {:babashka/args [-e (+ 1 2 3)]} + :tree {:babashka/args [:clojure -Stree]} + :count-files {:babashka/process {:args [bash -c "ls | wc -l"] + ,,,}} + :all {:babashka/args [:do :eval-plus + :do :tree + :do :count-files]}}}