borkdude / glam

A cross-platform package manager.
Eclipse Public License 1.0
63 stars 3 forks source link

Simplify discovery of tool specific path #26

Open hugoduncan opened 3 years ago

hugoduncan commented 3 years ago

When using glam from code that invokes command line tools directly, without using a shell, make it simple to get the installed path of a specific package, preferably as a single call that installs the tool if needed.

This would remove the need to parse the output of install to find the path component that refers to a specific tool.

borkdude commented 3 years ago

We could add a flag to install that skips global and local config (--no-global, --no-local). In that case glam install will only return the paths for the installed tool(s) on the command line. How does that sound?

borkdude commented 3 years ago

@hugoduncan Hmm, I think glam-bin already does this by default. The local and global config paths are stored in files but not printed to stdout.

borkdude commented 3 years ago
user=> (require '[babashka.process :refer [$]])
nil
user=> (-> ($ glam-bin install clj-kondo/clj-kondo) :out slurp)
"/Users/borkdude/.glam/repository/clj-kondo/clj-kondo/2020.09.09\n"