Tasks: don't tokenize when string refers to file
This commit is contained in:
parent
cf1c8649c0
commit
0014840506
1 changed files with 12 additions and 6 deletions
|
|
@ -28,10 +28,13 @@
|
||||||
(if (string? o)
|
(if (string? o)
|
||||||
(update opts :out io/file)
|
(update opts :out io/file)
|
||||||
opts)
|
opts)
|
||||||
opts)]
|
opts)
|
||||||
|
cmd (if (.exists (io/file cmd))
|
||||||
|
[cmd]
|
||||||
|
(p/tokenize cmd))
|
||||||
|
cmd (into cmd args)]
|
||||||
(exit-non-zero
|
(exit-non-zero
|
||||||
(p/process (into (p/tokenize cmd) args)
|
(p/process cmd (merge default-opts opts)))))
|
||||||
(merge default-opts opts)))))
|
|
||||||
|
|
||||||
(defn clojure [cmd & args]
|
(defn clojure [cmd & args]
|
||||||
(let [[opts cmd args]
|
(let [[opts cmd args]
|
||||||
|
|
@ -42,10 +45,13 @@
|
||||||
(if (string? o)
|
(if (string? o)
|
||||||
(update opts :out io/file)
|
(update opts :out io/file)
|
||||||
opts)
|
opts)
|
||||||
opts)]
|
opts)
|
||||||
|
cmd (if (.exists (io/file cmd))
|
||||||
|
[cmd]
|
||||||
|
(p/tokenize cmd))
|
||||||
|
cmd (into cmd args)]
|
||||||
(exit-non-zero
|
(exit-non-zero
|
||||||
(deps/clojure (into (p/tokenize cmd) args)
|
(deps/clojure cmd (merge default-opts opts)))))
|
||||||
(merge default-opts opts)))))
|
|
||||||
|
|
||||||
(defn -wait [res]
|
(defn -wait [res]
|
||||||
(when res
|
(when res
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue