From f554a32dffca4deb2ac04e5b99ec604ed42277f6 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Sat, 20 Mar 2021 21:11:43 +0100 Subject: [PATCH] fix tests --- bb.edn | 4 ---- src/babashka/main.clj | 5 +++-- 2 files changed, 3 insertions(+), 6 deletions(-) delete mode 100644 bb.edn diff --git a/bb.edn b/bb.edn deleted file mode 100644 index 1a5d83df..00000000 --- a/bb.edn +++ /dev/null @@ -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]}}} diff --git a/src/babashka/main.clj b/src/babashka/main.clj index a029b521..188c4ec3 100644 --- a/src/babashka/main.clj +++ b/src/babashka/main.clj @@ -783,8 +783,9 @@ Use -- to separate script command line args from bb command line args. "bb.edn")] (when (fs/exists? bb-edn-file) (let [edn (edn/read-string (slurp bb-edn-file))] - (reset! bb-edn edn) - (deps/add-deps edn)))) + (reset! bb-edn 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)] (if-let [do-opts (:do opts)] (reduce (fn [prev-exit opts]