Skip to content

Commit a90c626

Browse files
committed
Favor running shadow-cljs via npx
As suggested by @ttheller a few days ago.
1 parent 5e5a42c commit a90c626

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

cider.el

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,10 @@ vector of middleware variables as a string."
167167
:package-version '(cider . "0.17.0"))
168168

169169
(defcustom cider-shadow-cljs-command
170-
"shadow-cljs"
171-
"The command used to execute shadow-cljs."
170+
"npx shadow-cljs"
171+
"The command used to execute shadow-cljs.
172+
173+
By default we favor the project-specific shadow-cljs over the system-wide."
172174
:type 'string
173175
:group 'cider
174176
:package-version '(cider . "0.17.0"))
@@ -329,7 +331,9 @@ Throws an error if PROJECT-TYPE is unknown. Known types are
329331
("lein" (cider--resolve-command cider-lein-command))
330332
("boot" (cider--resolve-command cider-boot-command))
331333
("clojure-cli" (cider--resolve-command cider-clojure-cli-command))
332-
("shadow-cljs" (cider--resolve-command cider-shadow-cljs-command))
334+
;; here we have to account for the possibility that the command is either
335+
;; "npx shadow-cljs" or just "shadow-cljs"
336+
("shadow-cljs" (cider--resolve-command ((split-string cider-shadow-cljs-command))))
333337
("gradle" (cider--resolve-command cider-gradle-command))
334338
(_ (user-error "Unsupported project type `%s'" project-type))))
335339

0 commit comments

Comments
 (0)