-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add XDG support for the cache dir #696
Labels
Comments
lgarron
added a commit
to lgarron/bun
that referenced
this issue
Oct 19, 2022
This partially addresses oven-sh#696 , by using `$XDG_CACHE_HOME` for those of us who already have that env var set.
lgarron
added a commit
to lgarron/bun
that referenced
this issue
Oct 19, 2022
…ME`. This partially addresses oven-sh#696 , by using `$XDG_CACHE_HOME` for those of us who already have that env var set.
Duplicate of #1678 |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
What is the problem this feature will solve?
the XDG spec is already implemented pretty nicely in this project, however I've noticed the
cache
dir~/.bun/install/cache/
was neglected in that regard (I think it can be configure but having it work out of the box is better).adding XDG support to the cache dir is a good idea because:
What is the feature you are proposing to solve the problem?
Implementing this is pretty simple, instead of writing cache files into
~/.bun/install/cache/
a simple series of checks is performed to pick the right path with backward compatibility in mind ofc:~/.bun/
exists use itXDG_CACHE_HOME
is set use$XDG_CACHE_HOME/bun/
XDG_CACHE_HOME
s default value which is~/.cache/bun/
If this gets implemented:
~/.bun/install/cache
toXDG_CACHE_HOME
(default is~/.cache
)What alternatives have you considered?
I don't think there is, Most of unix software supports this for a reason, I think bun should definitely have it.
The text was updated successfully, but these errors were encountered: