Skip to content

Commit

Permalink
:shell breaks clojure invocation
Browse files Browse the repository at this point in the history
clojure -Sdeps "{:aliases ...}" with :shell seems to become
unquotes/multiple args which then fail reading by the tools.deps cli

don't know why lein under windows cmd requires a shell? It just doesn't
do anything without.

closes #213
  • Loading branch information
thheller committed Mar 1, 2018
1 parent bc481ec commit 05a5722
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/main/shadow/cljs/npm/cli.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,20 @@
(-> (fs/lstatSync path)
(.isDirectory)))

(defn is-windows? []
(str/includes? js/process.platform "win32"))

(defn run [project-root cmd args proc-opts]
(let [spawn-opts
(-> {:cwd project-root
:shell true
:stdio "inherit"}
(cond->
;; can't figure out why lein won't work without this in windows cmd
;; probably similar issue with tools.deps but that doesn't exist for windows yet
;; need to verify first
(and (= "lein" cmd) (is-windows?))
(assoc :shell true
:windowsVerbatimArguments true))
(merge proc-opts)
(clj->js))]

Expand Down

1 comment on commit 05a5722

@bolasblack
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Please sign in to comment.