Implement commands with outputs
Expand infrastructure so we can read output from commands
This commit is contained in:
parent
e9011773e7
commit
a4f1e69808
1 changed files with 12 additions and 0 deletions
|
@ -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))))
|
Loading…
Reference in a new issue