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
|
- [#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
|
- [#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)
|
## 1.3.182 (2023-07-20)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@
|
||||||
[babashka.impl.process :as pp]
|
[babashka.impl.process :as pp]
|
||||||
[babashka.process :as p]
|
[babashka.process :as p]
|
||||||
[clojure.core.async :refer [<!!]]
|
[clojure.core.async :refer [<!!]]
|
||||||
[clojure.java.io :as io]
|
|
||||||
[clojure.string :as str]
|
[clojure.string :as str]
|
||||||
[rewrite-clj.node :as node]
|
[rewrite-clj.node :as node]
|
||||||
[rewrite-clj.parser :as parser]
|
[rewrite-clj.parser :as parser]
|
||||||
|
|
@ -386,7 +385,7 @@
|
||||||
loc (zip/down loc)]
|
loc (zip/down loc)]
|
||||||
(into []
|
(into []
|
||||||
(comp
|
(comp
|
||||||
(take-nth 2 )
|
(take-nth 2)
|
||||||
(take-while #(not (zip/end? %)))
|
(take-while #(not (zip/end? %)))
|
||||||
(filter zip/sexpr-able?)
|
(filter zip/sexpr-able?)
|
||||||
(map zip/sexpr)
|
(map zip/sexpr)
|
||||||
|
|
@ -426,8 +425,11 @@
|
||||||
([task] (run task nil))
|
([task] (run task nil))
|
||||||
([task {:keys [:parallel]
|
([task {:keys [:parallel]
|
||||||
:or {parallel (:parallel (current-task))}}]
|
:or {parallel (:parallel (current-task))}}]
|
||||||
(let [[[expr]] (assemble-task task parallel)]
|
(let [[[expr] exit-code] (assemble-task task parallel)]
|
||||||
(sci/eval-string* (ctx) expr))))
|
(if (or (nil? exit-code) (zero? exit-code))
|
||||||
|
(sci/eval-string* (ctx) expr)
|
||||||
|
(throw (ex-info nil
|
||||||
|
{:babashka/exit exit-code}))))))
|
||||||
|
|
||||||
(defn exec
|
(defn exec
|
||||||
([sym]
|
([sym]
|
||||||
|
|
|
||||||
|
|
@ -528,3 +528,6 @@ even more stuff here\"
|
||||||
(deftest adjacent-bb-edn-test
|
(deftest adjacent-bb-edn-test
|
||||||
(is (= {1 {:id 1}} (bb "test-resources/adjacent_bb/medley.bb")))
|
(is (= {1 {:id 1}} (bb "test-resources/adjacent_bb/medley.bb")))
|
||||||
(is (= {1 {:id 1}} (bb "-f" "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