Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

404 B
Raw Blame
(ns metabuild-common.env
  (:require
   [clojure.string :as str]
   [environ.core :as env]))

(set! *warn-on-reflection* true)

(defn env-or-throw
  "Fetch an env var value or throw an Exception if it is unset."
  [k]
  (or (get env/env k)
      (throw (Exception. (format "%s is unset. Please set it and try again."
                                 (str/upper-case (str/replace (name k) #"-" "_")))))))