       3 (runbld.facts.facter3.Facter3. (facter))
       2 (runbld.facts.facter2.Facter2. (facter))
       1 (runbld.facts.facter1.Facter1. (facter)))))
-

  "facter")

(defn facter-installed? []
  (let [{:keys [exit]} (io/run "which" facter-program)]
    (zero? exit)))

(defn facter-version []
  (when (facter-installed?)

                              version-string)})))))

(defn facter []
  (when (facter-installed?)
    (let [{:keys [out err exit]} (io/run facter-program "--yaml")]
      (if out
        (yaml/parse-string out)
        (throw+ {:error ::empty-facter
                 :msg (format "facter returned empty (%d): %s" exit err)})))))

(defn make-facter []
  (if-let [{:keys [major]} (facter-version)]
