This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-06-19
Channels
- # aws-lambda (1)
- # beginners (35)
- # cider (7)
- # cljsjs (2)
- # clojure (48)
- # clojure-austria (1)
- # clojure-conj (9)
- # clojure-dev (8)
- # clojure-india (6)
- # clojure-italy (12)
- # clojure-nl (8)
- # clojure-norway (3)
- # clojure-spec (9)
- # clojure-uk (92)
- # clojurescript (103)
- # community-development (7)
- # cursive (15)
- # datomic (75)
- # devcards (3)
- # emacs (3)
- # events (1)
- # fulcro (129)
- # hoplon (4)
- # immutant (2)
- # jobs (10)
- # leiningen (9)
- # off-topic (4)
- # onyx (2)
- # re-frame (45)
- # reagent (39)
- # reitit (40)
- # remote-jobs (4)
- # ring (2)
- # ring-swagger (9)
- # shadow-cljs (17)
- # tools-deps (31)
Is there a list of likely locations I can try to look for the clojure
command, so I can default it for the user if it exists?
@cfleming not sure about windows but I guess on Linux it really depends, I actually added a prefix option to make install location customizable. Usually you use something like which
or env
depending on the use case. This answer might help you: https://unix.stackexchange.com/questions/12736/how-does-usr-bin-env-know-which-program-to-use#12749
@richiardiandrea Thanks. The problem is that when I execute from within IntelliJ, the user’s path is generally not set correctly.
So the user will have to configure it, but I was hoping for a list of likely absolute paths I could check.
The one you mentioned is most likely one. I use $HOME/.local/bin/clojure
Some distro might install in /opt
Some directly in /usr/bin
maybe? I guess these are the most common if I were to answer that
@cfleming Why is the user's path not set for IntelliJ? (genuinely curious -- I'm not used to programs running without the standard user shell environment being available... I think?)
@seancorfield I have stumbled upon it on Mac: Dock and Finder are launched directly by user's launchd, which is launched directly by system launchd, so no shell is executed or profile file is read, so their environment is pretty bare.
@cfleming /usr/bin/clojure
on Arch Linux (and I suppose in every other distro that bothered to package Clojure)
@cfleming /usr/local/bin/clojure
for Linux installer from http://clojure.org
@dottedmag Thanks!
@cfleming FWIW, lein-tools-deps
went with a mixture of overridable defaults along with searching https://github.com/RickMoynihan/lein-tools-deps/blob/master/src/lein_tools_deps/env.clj#L14-L22
Given the above, it would ultimately end up having defaults like this on non-Windows platforms
["/usr/local/bin/clojure" "/usr/bin/clojure" "/opt/local/bin/clojure"]
Yeah I’d much rather of not relied on the executable at all (and just used the library); but then you don’t know where the find the :install
deps.edn
file
I’m considering moving that into tools.deps
so it would be on the classpath?
The risk with that I guess is that organisations cannot specify repos globally. Maybe the root directory should go into /etc/clojure.conf or something. That's what apache, nginx, etc. do
it would be on the classpath or perhaps it would be automatically included such that it isn’t even a distinct deps.edn. still tbd.
@dominicm I think that would be the right solution to that problem, if we wanted to do something about it (which I do not at this time)
@rickmoynihan Yes, I would much prefer that too - then the user could just specify a tools.deps version.
@alexmiller Moving the install file into tools.deps would be great.