We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bin-dir
This is from Windows Terminal + Powershell:
~ $ bbin install io.github.rads/watch ----- Error -------------------------------------------------------------------- Type: java.nio.file.AccessDeniedException Message: C:\Users\.bbin Location: C:\Users\alesn\scoop\apps\bbin\current\bbin:61:3 ----- Context ------------------------------------------------------------------ 57: (when-let [v (:local/root cli-opts)] 58: {:local/root (str (fs/canonicalize v {:nofollow-links true}))}))) 59: 60: (defn ensure-bbin-dirs [cli-opts] 61: (fs/create-dirs (bin-dir cli-opts))) ^--- C:\Users\.bbin 62: 63: (ns babashka.bbin.scripts 64: (:require [babashka.fs :as fs] 65: [babashka.deps :as deps] 66: [rads.deps-info.infer :as deps-info-infer] ----- Stack trace -------------------------------------------------------------- babashka.fs/create-dirs - <built-in> babashka.bbin.util/ensure-bbin-dirs - C:\Users\alesn\scoop\apps\bbin\current\bbin:61:3 babashka.bbin.util/ensure-bbin-dirs - C:\Users\alesn\scoop\apps\bbin\current\bbin:60:1 babashka.bbin.scripts - C:\Users\alesn\scoop\apps\bbin\current\bbin:337:7 babashka.bbin.cli - C:\Users\alesn\scoop\apps\bbin\current\bbin:373:10 babashka.bbin.cli/bbin - C:\Users\alesn\scoop\apps\bbin\current\bbin:403:5 babashka.bbin.cli/bbin - C:\Users\alesn\scoop\apps\bbin\current\bbin:400:1 babashka.bbin.cli - C:\Users\alesn\scoop\apps\bbin\current\bbin:406:3 clojure.core/apply - <built-in> babashka.bbin.cli - C:\Users\alesn\scoop\apps\bbin\current\bbin:409:3
Error reported on https://github.com/babashka/bbin/blob/main/bbin#L61
But in fact the issue seems to be here https://github.com/babashka/bbin/blob/main/bbin#L47
Looks like (fs/expand-home) is not working correctly and it forgets last component from the path. I'll do a bug report to babashka/fs too.
(fs/expand-home)
babashka/fs
My recommendation is to get user directory from environment variables which are mutually exclusive on each platform, something along these lines:
(def ^:dynamic *bbin-root* (str (or (.get (System/getenv) "HOME") (.get (System/getenv) "USERPROFILE")) File/separator ".bbin"))
Probably just wait a moment to fs/expand-home to be fixed.
fs/expand-home
The text was updated successfully, but these errors were encountered:
After short conversation with @borkdude it turned out fs/expend-home will be fixed with the very next release of bb
fs/expend-home
bb
Sorry, something went wrong.
52bc0d0
Thanks for creating this issue. I bumped the minimum Babashka version to 0.9.162 and made sure we check this even in the generated bbin script.
0.9.162
bbin
No branches or pull requests
This is from Windows Terminal + Powershell:
Error reported on
https://github.com/babashka/bbin/blob/main/bbin#L61
But in fact the issue seems to be here
https://github.com/babashka/bbin/blob/main/bbin#L47
Looks like
(fs/expand-home)
is not working correctly and it forgets last component from the path. I'll do a bug report tobabashka/fs
too.My recommendation is to get user directory from environment variables which are mutually exclusive on each platform, something along these lines:
Probably just wait a moment to
fs/expand-home
to be fixed.The text was updated successfully, but these errors were encountered: