From d288ef293894f9d92592ce9c409c7c3634672bea Mon Sep 17 00:00:00 2001 From: Oleksandr Yakushev Date: Fri, 6 Sep 2024 16:41:19 +0300 Subject: [PATCH] Correctly quote allowAttachSelf argument for Leiningen --- 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 18db4705e..d5bd42e2c 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 a8ea1d9b2..5f9345a52 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 c82dbe800..1cdbd8817 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"))))