wip [skip ci]
This commit is contained in:
parent
9051d3aac7
commit
40e7b739e9
2 changed files with 6 additions and 3 deletions
|
|
@ -372,7 +372,7 @@ Use -- to separate script command line args from bb command line args.
|
||||||
(case opt
|
(case opt
|
||||||
("--") (assoc opts-map :command-line-args (next options))
|
("--") (assoc opts-map :command-line-args (next options))
|
||||||
("--clojure" ":clojure") (assoc opts-map :clojure true
|
("--clojure" ":clojure") (assoc opts-map :clojure true
|
||||||
:opts (rest options))
|
:command-line-args (rest options))
|
||||||
("--version" ":version") {:version true}
|
("--version" ":version") {:version true}
|
||||||
("--help" "-h" "-?") {:help? true}
|
("--help" "-h" "-?") {:help? true}
|
||||||
("--verbose")(recur (next options)
|
("--verbose")(recur (next options)
|
||||||
|
|
@ -513,7 +513,8 @@ Use -- to separate script command line args from bb command line args.
|
||||||
(let [cmd-line-args (get task :args)]
|
(let [cmd-line-args (get task :args)]
|
||||||
(parse-opts (seq (map str (concat cmd-line-args command-line-args)))))
|
(parse-opts (seq (map str (concat cmd-line-args command-line-args)))))
|
||||||
:shell
|
:shell
|
||||||
(let [args (get task :args)]
|
(let [args (get task :args)
|
||||||
|
args (into (vec args) command-line-args)]
|
||||||
{:exec (fn []
|
{:exec (fn []
|
||||||
[nil
|
[nil
|
||||||
(-> (p/process args {:inherit true})
|
(-> (p/process args {:inherit true})
|
||||||
|
|
@ -715,7 +716,7 @@ Use -- to separate script command line args from bb command line args.
|
||||||
exec-src [(sci/binding [sci/file (or @sci/file "<task: >")]
|
exec-src [(sci/binding [sci/file (or @sci/file "<task: >")]
|
||||||
(sci/eval-string* sci-ctx exec-src))
|
(sci/eval-string* sci-ctx exec-src))
|
||||||
0]
|
0]
|
||||||
clojure [nil (if-let [proc (deps/clojure (:opts opts))]
|
clojure [nil (if-let [proc (deps/clojure command-line-args)]
|
||||||
(-> @proc :exit)
|
(-> @proc :exit)
|
||||||
0)]
|
0)]
|
||||||
uberscript [nil 0]
|
uberscript [nil 0]
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,8 @@
|
||||||
[clojure.string :as str]))
|
[clojure.string :as str]))
|
||||||
|
|
||||||
(defn bash [& args]
|
(defn bash [& args]
|
||||||
|
(prn :args args)
|
||||||
|
(prn :cmd *command-line-args*)
|
||||||
(-> (p/process ["bash" "-c" (str/join " " args)]
|
(-> (p/process ["bash" "-c" (str/join " " args)]
|
||||||
{:inherit true})
|
{:inherit true})
|
||||||
p/check))
|
p/check))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue