diff --git a/src/metabase/config.clj b/src/metabase/config.clj index 93a8128e63d8ed1e3ed4027ad529cd92e4eb5e65..084facdf0e21cf8bc2dc40c7a9da8ca978e50ebe 100644 --- a/src/metabase/config.clj +++ b/src/metabase/config.clj @@ -60,8 +60,12 @@ ;; Metabase version is of the format `GIT-TAG (GIT-SHORT-HASH GIT-BRANCH)` (defn- version-info-from-shell-script [] - (let [[tag hash branch date] (-> (shell/sh "./bin/version") :out s/trim (s/split #" "))] - {:tag tag, :hash hash, :branch branch, :date date})) + (try + (let [[tag hash branch date] (-> (shell/sh "./bin/version") :out s/trim (s/split #" "))] + {:tag tag, :hash hash, :branch branch, :date date}) + ;; if ./bin/version fails (e.g., if we are developing on Windows) just return something so the whole thing doesn't barf + (catch Throwable _ + {:tag "?", :hash "?", :branch "?", :date "?"}))) (defn- version-info-from-properties-file [] (when-let [props-file (io/resource "version.properties")]