updated to exit gracefully when config is invalid

This commit is contained in:
dmitri.sotnikov@gmail.com 2018-03-15 10:08:31 -04:00
parent ed0541edd8
commit 56421bc284

View file

@ -20,7 +20,9 @@
(def config (-> (find-config) fs/readFileSync str edn/read-string))
(def mastodon-client (or (some-> config :mastodon clj->js mastodon.)
(js/console.error "missing Mastodon client configuration!")))
(do
(js/console.error "missing Mastodon client configuration!")
(js/process.exit 1))))
(defn js->edn [data]
(js->clj data :keywordize-keys true))