From 9267239983b4d8153dafb9893d3b088b9e90a5aa Mon Sep 17 00:00:00 2001 From: niten Date: Mon, 20 Jun 2022 15:53:52 -0700 Subject: [PATCH] Strip newline from auth token file --- src/pricebot/core.clj | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/pricebot/core.clj b/src/pricebot/core.clj index 6510eaa..6e6af25 100644 --- a/src/pricebot/core.clj +++ b/src/pricebot/core.clj @@ -193,12 +193,6 @@ "available: " (pprint-to-string resolved))) :else resolved))) -(defn pthru [label o] - (println (str "************ START " label)) - (clojure.pprint/pprint o) - (println (str "************ END " label)) - o) - (defn -main [& args] (let [required-keys [:exchange-host :currency @@ -212,7 +206,10 @@ bebot-auth-token-file bebot-channel-id notify-user]} (get-args required-keys args)] - (let [logger (bebot-log/make-logger bebot-url (pthru "AUTH_TOKEN" (slurp bebot-auth-token-file)) bebot-channel-id notify-user) + (let [logger (bebot-log/make-logger bebot-url + (-> bebot-auth-token-file slurp str/trim-newline) + bebot-channel-id + notify-user) checks (create-checks logger) bot (reify-bot exchange-host (-> currency str/lower-case keyword)) shutdown (chan)]