Skip to content

Commit 72dd3b7

Browse files
interpolate stdin file values as well
1 parent 00526f4 commit 72dd3b7

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/tools.clj

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,15 @@
6060
(arg-context json-arg-string))]
6161
(try
6262
(if (:container definition) ;; synchronous call to container function
63-
(let [function-call (merge
64-
(:container definition)
65-
(dissoc defaults :functions)
66-
{:command (interpolate-coll
67-
(-> definition :container :command)
68-
arg-context)}
69-
(when-let [wd (-> definition :container :working-dir)]
70-
{:working-dir (first (interpolate arg-context wd))}))]
63+
(let [function-call (cond-> (merge
64+
(:container definition)
65+
(dissoc defaults :functions)
66+
{:command (interpolate-coll
67+
(-> definition :container :command)
68+
arg-context)}
69+
(when-let [wd (-> definition :container :working-dir)]
70+
{:working-dir (first (interpolate arg-context wd))}))
71+
(-> definition :input :file) (update-in [:input :file] (fn [s] (first (interpolate arg-context s)))))]
7172
(jsonrpc/notify
7273
:message
7374
{:debug (format "function call %s"

0 commit comments

Comments
 (0)