babashka / bbin

Install any Babashka script or project with one command
MIT License
138 stars 9 forks source link

Installation fails if $GITLIBS are set #73

Open kthu opened 1 year ago

kthu commented 1 year ago

As documented here, tools.gitlibs allows overriding the default ~/.gitlibs directory using an environment variable. If this variable is set, bbin will fail since it hardcodes ~/.gitlibs:

❯ echo $GITLIBS
/home/kjetil/.cache/clojure-gitlibs/

~                                                                                                                                                                                                                                           
❯ bbin install com.github.babashka/neil

Starting install...

bin   version  location                            
────  ───────  ────────────────────────────────────
neil  v0.2.62  https://github.com/babashka/neil.git

Install complete.

~                                                                                                                                                                                                                                    
❯ grep gitlib $(which neil)
(def script-root "/home/kjetil/.gitlibs/libs/com.github.babashka/neil/f597921dcbf4774d799be62d8fbbce7171b12c3f")

~                                                                                                                                                                                                                                           
❯ ls /home/kjetil/.gitlibs
ls: cannot access '/home/kjetil/.gitlibs': No such file or directory

~                                                                                                                                                                                                                                           
❯ ls /home/kjetil/.cache/clojure-gitlibs/libs/com.github.babashka/neil/f597921dcbf4774d799be62d8fbbce7171b12c3f
CHANGELOG.md  LICENSE  README.md  README.template.md  bb.edn  default.nix  deps.edn  dev  flake.lock  flake.nix  neil  neil-tests.el  neil.bat  neil.el  prelude  script  src  test  test-resources  tests-clj  tests.clj  tests_emacs.clj