oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
74.06k stars 2.76k forks source link

`.bunfig.toml` `globalDir` and `globalBinDir` is not respected on Windows 11 #12886

Open ianzone opened 3 months ago

ianzone commented 3 months ago

What version of Bun is running?

1.1.20+ae1948925

What platform is your computer?

x64

What steps can reproduce the bug?

set bunfig.toml

[install]
globalDir = "D:\\.bun\\install\\global"
globalBinDir = "D:\\.bun\\bin"

[install.cache]
dir = "D:\\.bun\\install\\cache"

then run bun pm ls -g

What is the expected behavior?

list global packages

What do you see instead?

error: No package.json was found for directory "C:\Users\yihen\.bun\install\global"
note: Run "bun init" to initialize a project

Additional information

similar issues https://github.com/oven-sh/bun/issues/5636 https://github.com/oven-sh/bun/issues/4553

ianzone commented 3 months ago

better to check the cache dir also if you fix.

Gn3po4g commented 2 months ago
[install.cache]
dir = "xxx"

It doesn't work for me either.

moieo commented 2 months ago

I temporarily used SymbolicLink to meet my needs

New-Item -ItemType SymbolicLink -Path "C:\Users\Moieo\.bun" -Target "D:\Environment\Bun"