Skip to content
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

bunfig.toml: doesn't respect install.cache.dir #12990

Closed
sequencerr opened this issue Aug 1, 2024 · 3 comments
Closed

bunfig.toml: doesn't respect install.cache.dir #12990

sequencerr opened this issue Aug 1, 2024 · 3 comments
Labels
bug Something isn't working needs triage

Comments

@sequencerr
Copy link
Contributor

What version of Bun is running?

No response

What platform is your computer?

No response

What steps can reproduce the bug?

I didn't use install.sh script. Installed to bun binary to different directory from ~/.bun/bin/bun.

bunfig.toml: doesn't respect install.cache.dir
also [install]\n auto = "force" creates local node_modules directory. not sure about other config parameters, didn't test.

What is the expected behavior?

No response

What do you see instead?

No response

Additional information

No response

@vktrl
Copy link
Contributor

vktrl commented Aug 15, 2024

It ignores CLI flags as well.

$ cat bunfig.toml                                                                               
[install.cache]
dir = "./custom-cache"

$ bun --cache-dir='./custom-cache' pm cache                                
/Users/vktrl/.bun/install/cache

$ uname -psmr
Darwin 23.5.0 arm64 arm

$ bun --revision
1.1.22-canary.96+df33f2b2a

@ragavpr
Copy link

ragavpr commented Sep 2, 2024

Duplicate of #6423

Can confirm this issue, with (1.1.26+0a37423ba Arch)
this simple config file is automatically read and applied when in

  • $HOME/.bunfig.toml
  • $cwd/bunfig.toml (current working dir)

For testing purposes, an invalid registry URL is written in config, it is used and does fail as expected.
Yet still install.cache.dir is ignored.

[install]
registry = "https://registry.invalid.local"

[install.cache]
dir = "/somedir/.bun/install/cache"

Current workaround

  • Just symlinked the default ~/.bun dir to my required location (/somedir/.bun) in a different volume (still ext4), confirmed that hardlinks still do work in that same volume.
  • After the fix, symlink can be removed and the required location can be directly used as cache.

@sequencerr sequencerr closed this as not planned Won't fix, can't repro, duplicate, stale Sep 3, 2024
@sequencerr
Copy link
Contributor Author

closing as duplicate

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

No branches or pull requests

3 participants