Open wojtekmaj opened 11 months ago
I'm also seeing this:
This issue seems like a duplicate of the more general #5636.
This issue seems like a duplicate of the more general #5636.
This problem also appears using a local config. This problem prohibits Gitlab CI from persisting the cache across jobs without a workaround
Same issue here ... cannot use it in CI since the option is completely ignored.
This env var works: BUN_INSTALL_CACHE_DIR
(Windows + git bash; env var set via Windows settings.)
In case anyone wondered, the env var workaround mentioned above works for non-Windows as well (at least Mac, I'd assume Linux as well).
It seems, that this also applies to --cache-dir
option as running install with it ignores any value.
Quick test on macos:
$ bun pm cache --cache-dir .bun
/Users/john.doe/.bun/install/cache
$ BUN_INSTALL_CACHE_DIR=.bun bun pm cache
/Users/my/current/path/.bun
Tested valid config locations
.bunfig.toml
bunfig.toml
(current working dir)Current workaround
$BUN_INSTALL_CACHE_DIR
environment variable can be set as mentioned in previous comments.~/.bun
dir to the required location (/somedir/.bun
) in a different volume (still ext4), confirmed that hardlinks still do work in that same volume.
What version of Bun is running?
1.0.5+1bf28e0d77a8b2261befbdb708cefd03e0126960
What platform is your computer?
Darwin 23.0.0 arm64 arm
What steps can reproduce the bug?
Create global
.bunfig.toml
with the following:And/or, create local
bunfig.toml
with the same contentsRun
bun pm cache
What is the expected behavior?
install cache dir to be set to .bun/cache directory relative to project's root
What do you see instead?
install cache dir option completely ignored
Additional information