Open kavsingh opened 3 months ago
note that bum remove
works despite versions not activated
~
❯ echo $BUM_INSTALL
/[$HOME]/.bum
~
❯ bum remove 1.1.21
"/[$HOME]/.bum/bun-versions/1.1.21"
v1.1.21 has been removed.
~
❯ bum remove 1.1.19
"/[$HOME]/.bum/bun-versions/1.1.19"
v1.1.19 has been removed.
~
❯ bum list
thread 'main' panicked at src/bun.rs:21:10:
Failed to execute bun -v, is bun installed?: Os { code: 2, kind: NotFound, message: "No such file or directory" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
~
❯ bum remove 1.1.20
"/[$HOME]/.bum/bun-versions/1.1.20"
v1.1.20 has been removed.
~
❯ ls ~/.bum/bun-versions
~
❯
but then no dice trying to re-install after remove
~
❯ bum use v1.1.21
Bum - installing bun for version 1.1.21...
Extracting zip file...
Failed Err(No such file or directory (os error 2))
~
❯ ls ~/.bum/bun-versions
1.1.21
~
❯
it seems to be to do with the usage of BUN_BIN_PATH
: https://github.com/owenizedd/bum/blob/67953aac17b7f98ac8a616eddfd6386e1cf14251/src/commands.rs#L87
the folder "~/.bun/bin"
does not exist on my system and does not seem to be created in install.sh
note - i removed my brew
installation of bun
before retrying bum
, so that might have taken out ~/.bun
. in any case, the same issue would probably affect anyone who hasn't installed bun
before.
i guess there would have to be a exists-or-create step similar to https://github.com/owenizedd/bum/blob/67953aac17b7f98ac8a616eddfd6386e1cf14251/src/commands.rs#L66
or install.sh
should create the folder (and add .bun/bin
to path in shell profile)?
i tried modifying the code locally to ensure the folder and it seemed to work
❯ bum use v1.1.21
bun used path "/$HOME/.bum/bun-versions/1.1.21/bun"
bun bin path "/$HOME/.bun/bin/bun"
no folder "/$HOME/.bun/bin", creating
Bun v1.1.21 is activated.
I see that makes sense it might happen if the folder doesn’t exist but bun
is available during installation, another solution is if bun
is available but folder is not there than create it during installation script.
Do you want to raise PR for the fix?
The installation script is still broken on my end :-/. Thanks to @kavsingh for the fix!
Re-trying
bum
on macOS arm64 after https://github.com/owenizedd/bum/issues/14#issuecomment-2247866356os:
macOS 14.5 (23F79)
chip:M3 Max
installing
bum
went well~/.zshrc
was successfully updated:looked up latest available
bun
version, all goodhowever attempting to install a bun version failed
without the
v
with the
v
with backtrace
looking into
$HOME/.bum
also happens when attempting older versions of bun