clj-on-windows

For those interested in making clj on Windows https://dev.clojure.org/jira/browse/TDEPS-67. Also see https://github.com/littleli/scoop-clojure.
Matthew Pettis 2019-12-30T17:34:44.048400Z

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?

littleli 2019-12-30T17:52:46.049Z

My recommendation is to use scoop installer: https://github.com/littleli/scoop-clojure

Matthew Pettis 2019-12-30T17:53:06.049500Z

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"

Matthew Pettis 2019-12-30T17:54:07.049600Z

OK, thank you, I will try that, report back.

Matthew Pettis 2019-12-30T18:06:59.049800Z

This worked perfectly for me, thank you!

Matthew Pettis 2019-12-30T18:08:43.051700Z

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.

1
borkdude 2019-12-30T18:16:31.052300Z

@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

Matthew Pettis 2019-12-30T18:26:43.053900Z

@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.

borkdude 2019-12-30T18:34:11.054Z

Sure. You can also install it with scoop btw, the name doesn't conflict.

seancorfield 2019-12-30T18:40:49.055500Z

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`

seancorfield 2019-12-30T18:41:27.056200Z

And, yeah, @borkdude’s deps.clj works nicely on cmd and Powershell (and can also be installed via Scoop).

👍 1