Implement commands with outputs

Expand infrastructure so we can read output from commands
This commit is contained in:
bom 2024-10-11 12:43:58 +02:00
parent e9011773e7
commit a4f1e69808

View file

@ -11,3 +11,15 @@
(println command)) (println command))
(when-not dry-run (when-not dry-run
(apply t/shell command)))) (apply t/shell command))))
(defn-spec execute-output! string?
[command seq?
devops ::d/devops]
(let [{:keys [dry-run debug]} devops]
(when debug
(println command))
(when-not dry-run
(->> command
(t/shell {:out :string})
:out
clojure.string/trim))))