-
-
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
configure cider to use PowerShell 7.x and not Windows PowerShell 5.1 on windows #3588
Comments
Lines 139 to 147 in 5261886
Let us know if you have further questions! Cheers - V |
I am really not that experience |
Yes, please add something like |
thanks i did just that but now i am getting this error
setting this variable to use powershell, removes the error, but i am back to using powershell not pwsh |
It looks like a quoting problem. Quoting can be tricky on windows, although we specifically handle it if For reference, this is our quoting code: Lines 801 to 810 in 5261886
What I would suggest is:
|
Not sure how i can help but
Kinda works I think, does this help |
I see! That's promising, I guess. Could you paste the exact output shown in Example on Mac:
|
When I use powershell (which succeed) this is what is in Messages*
when I use pwsh this is the Messages Now I need to add that I research if there was any quoting rules changes between pwsh and powershell, and there should not be, the languages should be the same, the differences are in the underlying .net framework uses, which mainly only impact the availability of some modules , but quoting rules should be the same, so this issue should not exist |
It may be worth trying to skip the double quotations. Maybe (and this is speculation of mine), with pwsh it suffices to encode the command. Please try the following
|
Sorry didnt work
Now this is probably not it, but could the space in te folder name |
In #3588 (comment), it is shown that we got a JVM-level exception, so According to chatgpt:
In our implementation, we only encode as So please undo #3588 (comment) and try:
|
Now I am getting this error
|
At least we tried :) What are your thoughts on starting a cider-nrepl server from the terminal, and then |
i will use powershell for now , just a weird bug, might be a bug in pwsh who knows :) |
Alright, happy that you have an alternative and that we documented some attempts! |
Do you think , we should keep this issue open, for future attempters I am using
|
Generally we're not keen on having open issues that we don't plan to work on - it keeps the expectations aligned. @ikappaki might be interested in going over this thread. |
Sorry to coming back to this but Now this is the command cider runs
Kinda late , but better late then never
$decodedCommand have this string in it let call this Command1
This command Command1, raise en error when run by pwsh, but run successfully when run by powershell. pwsh being the new portable dotnet powershell and powerhsell being the older 5,1 windows only powershell This command, lets call it Command2, run successfully on pwsh but fails with an error on powershell (i removed the double double quotes
So for now at least we cannot treat pwsh and powershell as equal, while i cant find a nicer fix, or any documentation of these differences, i think cider should have two different commands prepared one for pwsh with a single double quote and the old or current command can remain to be used by powershell |
Thanks much for persevering! If the quotations were problematic, why did our attempt of skippking them not improve things? Feel free to try it again, with variations. You could create a PR out of it or simply let me know what to change. |
The decoded command from that fix looks like this
the pwsh command that you need to produce looks like this
I reviewed your code to the best of my abilities, i dont see why it strips the single |
I found this issue online, might be related and might be a pwsh bug removing the signle quotation , but not sure yet https://stackoverflow.com/questions/59036580/pwsh-command-is-removing-quotation-marks |
This works, I am not an elisp coder, so this is not necessarily the best code, but it works
Proof
|
This is my first pull request ever, i feel afraid |
Cider fails to jack in a repl , and this initially seem to be because its trying to start the repl using
c:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe
instead of
C:\Program Files\PowerShell\7\pwsh.exe
I installed Clojure CLI in a path that is only accessible for PowerShell 7.x not for Windows PowerShell 5.1
So how can i configure cider (or emacs) to use pwsh (which is the command for Powershell 7.x) not powershell (which is the command for the older Windows Powershell 5.1)
I can confirm that adding the clojure cli module to a Windows Powershell 5.1 modules path, fixes my initial issue
so i just want the ability to configure either cider or emacs to use pwsh not powershell
Also you might want to check this calva issue BetterThanTomorrow/calva#1000 for suggestion on how to solve this, since this is basically the same issue but in emacs
The text was updated successfully, but these errors were encountered: