-
-
Notifications
You must be signed in to change notification settings - Fork 645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Escape clojure cli command params on MS-win for native commands #3342
Escape clojure cli command params on MS-win for native commands #3342
Conversation
even for non powershell invocations
80deae2
to
30f260e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm - great work!
Thanks @vemv, I've just released I need to rebase some tests that escaped my attention. I'm also thinking of some further improvements to the code to treat powershell quoting a special I'll post an update soon. |
- `cider-inject-jack-in-dependencies' requires an additional arg - introduces `cider--shell-quote-argument' to support PowerShell arg quoting - `cider--powershell-encode-command' now only encodes but does not quotes args (this is the job of `cider--shell-quote-argument' now). Tests rebased to - Account for additional command arg in jack in commands - Account for the fact that cider--powershell-encode-command only encodes but not quotes any more - quoting command for dependencies is os/command specific. - Run an example jack-in command test for powershell.
a759a44
to
f11a8a9
Compare
Hi, I've updated the code to treat PowerShell quoting similarly to all tests are passing, I think we are good to go for the final review. Thanks |
test/cider-tests.el
Outdated
@@ -268,7 +268,7 @@ | |||
(shell-quote-argument "cider.nrepl/cider-middleware") | |||
" repl -s wait"))) | |||
(it "can concat in a gradle project" | |||
(expect (cider-inject-jack-in-dependencies "--no-daemon" ":clojureRepl" 'gradle) | |||
(expect (cider-inject-jack-in-dependencies "--no-daemon" ":clojureRepl" 'gradle "grandle") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gradle :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated the API and this argument is now optional, thus I removed the new argument altogether since it only effective in clojure-cli
so that it does not break API compatibility
Hi, I've provisionally set the new jack-in-dependencies COMMAND arg to I've also added a test for thanks |
I think we're good to go now. Thanks! |
Hi @vemv, could this have been a GH transient issue GH accessing ... GH via PowerShell? Can you please rerun the action and see if it passes? I've just updated my master CIDER fork with the latest updates and that particular bit worked fine:
Looking at the
it tries to download Thanks |
Sounds plausible. Let's see how the build goes over the following days/weeks. |
Hi,
could you please review patch to encode clojure cli native command args on MS-Windows. It addresses #3341.
The clojure cli command line args for clojure cli invocations other than powershell also need to be escaped.
I've relocated the escaping logic into
cider-clojure-cli-jack-in-dependencies
, assuming that powershell invocations are only relevant to clojure-cli, as is the new native escaping.I've also added a windows-nt only clojure-cli
deps.exe
integration test to test the same. For this, I need to install the deps.clj tools in the workflow for windows-nt.Thanks
eldev test
)eldev lint
) which is based onelisp-lint
and includescheckdoc
, check-declare, packaging metadata, indentation, and trailing whitespace checks.