Hi All, thanks for your work here. Newbie here, trying to make work on Windows 10 from the directions here: https://github.com/clojure/tools.deps.alpha/wiki/clj-on-Windows . I installed as per the instructions (installing to location 1), and asking questions here per those directions. I can only make this run if 1.) I run Powershell as an administrator, 1.) Change execution policy as: Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process
3.) Run: Import-Module ClojureTools
. And then I can run clj -h
and it works. I assume I am missing some steps to make this run without elevated privileges? Ultimately I"d like to run this from an un-elevated powershell, or even the cmd.exe. Actually, ideally, I'd like to run this from the Windows Subsystem for Linux (though I haven't tried to install this here yet). Could anyone give any guidance on avoiding these extra steps?
My recommendation is to use scoop installer: https://github.com/littleli/scoop-clojure
fyi, this is what I can run in cmd.exe to invoke clj: powershell -command "Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process; Import-Module ClojureTools; clj -h"
OK, thank you, I will try that, report back.
This worked perfectly for me, thank you!
The scoop-clojure install recommended by @ales.najmannworked perfectly for me, so I no longer have issues. Perhaps that should be the recommended install method from the documentation? Otherwise, I assume the issue I had will be experienced by others.
@matthew.pettis Alternatively you can try this: https://github.com/borkdude/deps.clj/ It's a port of the Clojure powershell / bash stuff to a native binary which should also work in cmd.exe
@borkdude Thank you for this help. I will take a look, not sure I'll install on my current computer, as I now have a working setup, but I may on a different one. I appreciate the help.
Sure. You can also install it with scoop btw, the name doesn't conflict.
The nice thing about the Scoop install is that on top of clj
/`clojure` getting installed in Powershell, it also installs shims for cmd.exe
so you can run cmd-clj
/`cmd-clojure`
And, yeah, @borkdude’s deps.clj
works nicely on cmd
and Powershell (and can also be installed via Scoop).