parent
666ce9adc9
commit
ea4ebab807
3 changed files with 12 additions and 6 deletions
|
|
@ -11,6 +11,7 @@ A preview of the next release can be installed from
|
|||
|
||||
- [#1592](https://github.com/babashka/babashka/issues/1592): expose `sci.core` in babashka
|
||||
- [#1596](https://github.com/babashka/babashka/issues/1596): Fix `clojure.java.browse/browse-url` truncates URLs with multiple query parameters on Windows
|
||||
- [#1599](https://github.com/babashka/babashka/issues/1599): propagate error from `run` when task does not exist
|
||||
|
||||
## 1.3.182 (2023-07-20)
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
[babashka.impl.process :as pp]
|
||||
[babashka.process :as p]
|
||||
[clojure.core.async :refer [<!!]]
|
||||
[clojure.java.io :as io]
|
||||
[clojure.string :as str]
|
||||
[rewrite-clj.node :as node]
|
||||
[rewrite-clj.parser :as parser]
|
||||
|
|
@ -30,7 +29,7 @@
|
|||
(let [log-level @log-level]
|
||||
(when
|
||||
;; do not log when level is :error
|
||||
(identical? :info log-level)
|
||||
(identical? :info log-level)
|
||||
(binding [*out* *err*]
|
||||
(println (format "[bb %s]" (:name @task)) (str/join " " strs))))))
|
||||
|
||||
|
|
@ -128,7 +127,7 @@
|
|||
"Used internally for debugging"
|
||||
[& strs]
|
||||
(locking o
|
||||
(apply prn strs)))
|
||||
(apply prn strs)))
|
||||
|
||||
(defn wait-tasks [deps]
|
||||
(if deps
|
||||
|
|
@ -386,7 +385,7 @@
|
|||
loc (zip/down loc)]
|
||||
(into []
|
||||
(comp
|
||||
(take-nth 2 )
|
||||
(take-nth 2)
|
||||
(take-while #(not (zip/end? %)))
|
||||
(filter zip/sexpr-able?)
|
||||
(map zip/sexpr)
|
||||
|
|
@ -426,8 +425,11 @@
|
|||
([task] (run task nil))
|
||||
([task {:keys [:parallel]
|
||||
:or {parallel (:parallel (current-task))}}]
|
||||
(let [[[expr]] (assemble-task task parallel)]
|
||||
(sci/eval-string* (ctx) expr))))
|
||||
(let [[[expr] exit-code] (assemble-task task parallel)]
|
||||
(if (or (nil? exit-code) (zero? exit-code))
|
||||
(sci/eval-string* (ctx) expr)
|
||||
(throw (ex-info nil
|
||||
{:babashka/exit exit-code}))))))
|
||||
|
||||
(defn exec
|
||||
([sym]
|
||||
|
|
|
|||
|
|
@ -528,3 +528,6 @@ even more stuff here\"
|
|||
(deftest adjacent-bb-edn-test
|
||||
(is (= {1 {:id 1}} (bb "test-resources/adjacent_bb/medley.bb")))
|
||||
(is (= {1 {:id 1}} (bb "-f" "test-resources/adjacent_bb/medley.bb"))))
|
||||
|
||||
(deftest non-existing-tasks-in-run-gives-exit-code-1
|
||||
(is (thrown? Exception (bb "-Sdeps" "{:tasks {foo {:task (run (quote bar))}}}" "foo"))))
|
||||
|
|
|
|||
Loading…
Reference in a new issue