branch: elpa/cider
commit 87b836f289d5e3935b515eaac2959bd2e1d3ed37
Author: Oleksandr Yakushev <[email protected]>
Commit: GitHub <[email protected]>
Correctly quote allowAttachSelf argument for Leiningen (#3739)
---
CHANGELOG.md | 1 +
cider.el | 2 +-
test/cider-tests.el | 12 ++++++------
3 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 18db4705ea..d5bd42e2ce 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,6 +15,7 @@
### Bugs fixed
- [#3722](https://github.com/clojure-emacs/cider/pull/3722): Call
`cider-docstring--format` after checking argument is not nil.
+- [#3739](https://github.com/clojure-emacs/cider/pull/3739): Leiningen jack in
fails when `cider-enable-nrepl-jvmti-agent` is enabled.
## 1.15.1 (2024-07-01)
diff --git a/cider.el b/cider.el
index a8ea1d9b22..5f9345a525 100644
--- a/cider.el
+++ b/cider.el
@@ -823,7 +823,7 @@ removed, LEIN-PLUGINS, LEIN-MIDDLEWARES and finally PARAMS."
middleware))
lein-middlewares)
(when cider-enable-nrepl-jvmti-agent
- `(,(concat "update-in :jvm-opts conj
-Djdk.attach.allowAttachSelf"))))
+ `(,(concat "update-in :jvm-opts conj
'\"-Djdk.attach.allowAttachSelf\"'"))))
" -- ")
" -- "
(if (not cider-enrich-classpath)
diff --git a/test/cider-tests.el b/test/cider-tests.el
index c82dbe8007..1cdbd88171 100644
--- a/test/cider-tests.el
+++ b/test/cider-tests.el
@@ -158,7 +158,7 @@
(shell-quote-argument "[cider/cider-nrepl
\"0.50.2\"]")
" -- update-in :plugins conj "
(shell-quote-argument
"[mx.cider/lein-enrich-classpath \"1.19.3\"]")
- " -- update-in :jvm-opts conj
-Djdk.attach.allowAttachSelf"
+ " -- update-in :jvm-opts conj
'\"-Djdk.attach.allowAttachSelf\"'"
" -- update-in :middleware conj
cider.enrich-classpath.plugin-v2/middleware"
" -- repl :headless")))
@@ -172,7 +172,7 @@
(shell-quote-argument "[cider/cider-nrepl
\"0.50.2\"]")
" -- update-in :plugins conj "
(shell-quote-argument
"[mx.cider/lein-enrich-classpath \"1.19.3\"]")
- " -- update-in :jvm-opts conj
-Djdk.attach.allowAttachSelf"
+ " -- update-in :jvm-opts conj
'\"-Djdk.attach.allowAttachSelf\"'"
" -- update-in :middleware conj
cider.enrich-classpath.plugin-v2/middleware"
" -- repl :headless")))
@@ -185,7 +185,7 @@
(shell-quote-argument "[cider/cider-nrepl
\"0.50.2\"]")
" -- update-in :plugins conj "
(shell-quote-argument
"[mx.cider/lein-enrich-classpath \"1.19.3\"]")
- " -- update-in :jvm-opts conj
-Djdk.attach.allowAttachSelf"
+ " -- update-in :jvm-opts conj
'\"-Djdk.attach.allowAttachSelf\"'"
" -- update-in :middleware conj
cider.enrich-classpath.plugin-v2/middleware"
" -- repl :headless")))
@@ -226,7 +226,7 @@
(shell-quote-argument "[cider/cider-nrepl
\"0.50.2\"]")
" -- update-in :plugins conj "
(shell-quote-argument
"[mx.cider/lein-enrich-classpath \"1.19.3\"]")
- " -- update-in :jvm-opts conj
-Djdk.attach.allowAttachSelf"
+ " -- update-in :jvm-opts conj
'\"-Djdk.attach.allowAttachSelf\"'"
" -- update-in :middleware conj
cider.enrich-classpath.plugin-v2/middleware"
" -- repl :headless")))
@@ -262,7 +262,7 @@
(shell-quote-argument "[cider/cider-nrepl
\"0.50.2\"]")
" -- update-in :plugins conj "
(shell-quote-argument
"[mx.cider/lein-enrich-classpath \"1.19.3\"]")
- " -- update-in :jvm-opts conj
-Djdk.attach.allowAttachSelf"
+ " -- update-in :jvm-opts conj
'\"-Djdk.attach.allowAttachSelf\"'"
" -- update-in :middleware conj
cider.enrich-classpath.plugin-v2/middleware"
" -- repl :headless")))
(it "can concat in a boot project"
@@ -345,7 +345,7 @@
(shell-quote-argument "[cider/cider-nrepl
\"0.50.2\"]")
" -- update-in :plugins conj "
(shell-quote-argument
"[mx.cider/lein-enrich-classpath \"1.19.3\"]")
- " -- update-in :jvm-opts conj
-Djdk.attach.allowAttachSelf"
+ " -- update-in :jvm-opts conj
'\"-Djdk.attach.allowAttachSelf\"'"
" -- update-in :middleware conj
cider.enrich-classpath.plugin-v2/middleware"
" -- repl :headless"))))