fix tests

This commit is contained in:
Michiel Borkent 2021-03-20 21:11:43 +01:00
parent a8319d42c1
commit f554a32dff
2 changed files with 3 additions and 6 deletions

4
bb.edn
View file

@ -1,4 +0,0 @@
{:paths ["test-resources/task_scripts"]
:tasks {:main-task {:task/type :main
:main tasks ;; this calls tasks/-main
:args [1 2 3]}}}

View file

@ -783,8 +783,9 @@ Use -- to separate script command line args from bb command line args.
"bb.edn")] "bb.edn")]
(when (fs/exists? bb-edn-file) (when (fs/exists? bb-edn-file)
(let [edn (edn/read-string (slurp bb-edn-file))] (let [edn (edn/read-string (slurp bb-edn-file))]
(reset! bb-edn edn) (reset! bb-edn edn)))
(deps/add-deps edn)))) ;; we mutate the atom from tests as well, so despite the above it can contain a bb.edn
(when-let [bb-edn @bb-edn] (deps/add-deps bb-edn)))
(let [opts (parse-opts args)] (let [opts (parse-opts args)]
(if-let [do-opts (:do opts)] (if-let [do-opts (:do opts)]
(reduce (fn [prev-exit opts] (reduce (fn [prev-exit opts]