Skip to content

Commit 441bef4

Browse files
committed
internal: bb got smarter - adapt!
My cljdoc preview bb script had some illegal Clojure code! Babashka now enforces only recurring from tail position.
1 parent 8c3d78f commit 441bef4

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

script/cljdoc_preview.clj

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,14 @@
137137
(status/line :detail "%s container is running" (:name container))
138138
(let [url (str "http://localhost:" (:port container))]
139139
(loop []
140-
(try
141-
(curl/get url)
142-
(println url "reached")
143-
(catch Exception _e
144-
(println "waiting on" url " - hit Ctrl-C to give up")
145-
(Thread/sleep 4000)
146-
(recur))))))
140+
(if-not (try
141+
(curl/get url)
142+
url
143+
(catch Exception _e
144+
(Thread/sleep 4000)))
145+
(do (println "waiting on" url " - hit Ctrl-C to give up")
146+
(recur))
147+
(println "reached" url)))))
147148

148149
(defn status-server-print [container]
149150
(status/line :detail (str (:name container) ": " (status-server container))))

0 commit comments

Comments
 (0)