Skip to content

Commit a70fc41

Browse files
committed
Catch exception when browse is not supported, closes #657
1 parent 1cc0e8f commit a70fc41

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/nextjournal/clerk.clj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,11 @@
475475
(reset! !watcher {:paths watch-paths
476476
:watcher (apply beholder/watch #(file-event %) watch-paths)}))
477477
(when browse?
478-
(webserver/browse!))))
478+
(try
479+
(webserver/browse!)
480+
(catch UnsupportedOperationException e
481+
(binding [*out* *err*]
482+
(println "Clerk could not open the browser:" (.getMessage e))))))))
479483
config)
480484

481485
#_(serve! (with-meta {:help true} {:org.babashka/cli {}}))

0 commit comments

Comments
 (0)