Add function to capture output in infra

This commit is contained in:
bom 2024-11-22 13:47:47 +01:00
parent f4a4a30f24
commit 9441cfa773

View file

@ -12,3 +12,12 @@
(println c)) (println c))
(when-not dry-run (when-not dry-run
(apply t/shell c))))) (apply t/shell c)))))
(defn-spec execute-out! string?
[command ::core/command
config ::core/execution]
(let [{:keys [dry-run debug]} config]
(when debug
(println command))
(when-not dry-run
(:out (t/shell {:out :string} (clojure.string/join " " command))))))