Skip to content

Commit 87b836f

Browse files
Correctly quote allowAttachSelf argument for Leiningen (#3739)
1 parent 8fdb53e commit 87b836f

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
### Bugs fixed
1616

1717
- [#3722](https://github.com/clojure-emacs/cider/pull/3722): Call `cider-docstring--format` after checking argument is not nil.
18+
- [#3739](https://github.com/clojure-emacs/cider/pull/3739): Leiningen jack in fails when `cider-enable-nrepl-jvmti-agent` is enabled.
1819

1920
## 1.15.1 (2024-07-01)
2021

cider.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@ removed, LEIN-PLUGINS, LEIN-MIDDLEWARES and finally PARAMS."
823823
middleware))
824824
lein-middlewares)
825825
(when cider-enable-nrepl-jvmti-agent
826-
`(,(concat "update-in :jvm-opts conj -Djdk.attach.allowAttachSelf"))))
826+
`(,(concat "update-in :jvm-opts conj '\"-Djdk.attach.allowAttachSelf\"'"))))
827827
" -- ")
828828
" -- "
829829
(if (not cider-enrich-classpath)

test/cider-tests.el

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@
158158
(shell-quote-argument "[cider/cider-nrepl \"0.50.2\"]")
159159
" -- update-in :plugins conj "
160160
(shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]")
161-
" -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf"
161+
" -- update-in :jvm-opts conj '\"-Djdk.attach.allowAttachSelf\"'"
162162
" -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware"
163163
" -- repl :headless")))
164164

@@ -172,7 +172,7 @@
172172
(shell-quote-argument "[cider/cider-nrepl \"0.50.2\"]")
173173
" -- update-in :plugins conj "
174174
(shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]")
175-
" -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf"
175+
" -- update-in :jvm-opts conj '\"-Djdk.attach.allowAttachSelf\"'"
176176
" -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware"
177177
" -- repl :headless")))
178178

@@ -185,7 +185,7 @@
185185
(shell-quote-argument "[cider/cider-nrepl \"0.50.2\"]")
186186
" -- update-in :plugins conj "
187187
(shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]")
188-
" -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf"
188+
" -- update-in :jvm-opts conj '\"-Djdk.attach.allowAttachSelf\"'"
189189
" -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware"
190190
" -- repl :headless")))
191191

@@ -226,7 +226,7 @@
226226
(shell-quote-argument "[cider/cider-nrepl \"0.50.2\"]")
227227
" -- update-in :plugins conj "
228228
(shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]")
229-
" -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf"
229+
" -- update-in :jvm-opts conj '\"-Djdk.attach.allowAttachSelf\"'"
230230
" -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware"
231231
" -- repl :headless")))
232232

@@ -262,7 +262,7 @@
262262
(shell-quote-argument "[cider/cider-nrepl \"0.50.2\"]")
263263
" -- update-in :plugins conj "
264264
(shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]")
265-
" -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf"
265+
" -- update-in :jvm-opts conj '\"-Djdk.attach.allowAttachSelf\"'"
266266
" -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware"
267267
" -- repl :headless")))
268268
(it "can concat in a boot project"
@@ -345,7 +345,7 @@
345345
(shell-quote-argument "[cider/cider-nrepl \"0.50.2\"]")
346346
" -- update-in :plugins conj "
347347
(shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]")
348-
" -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf"
348+
" -- update-in :jvm-opts conj '\"-Djdk.attach.allowAttachSelf\"'"
349349
" -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware"
350350
" -- repl :headless"))))
351351

0 commit comments

Comments
 (0)