owenizedd / bum

Bum - Bun Version Manager ⚡
123 stars 1 forks source link

bum use v1.0.25 fails (`v` in the version) #15

Closed alexilyaev closed 1 month ago

alexilyaev commented 8 months ago

Adding the v in the version fails

$ bum use v1.0.25
Bum - installing bun for version v1.0.25...
HTTP request was not successful: 404
Extracting zip file...
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/utils/utils.rs:70:50
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Without the v it works

$ bum use 1.0.25
Bum - installing bun for version 1.0.25...
Extracting zip file...
Bun v1.0.25 is activated.
owenizedd commented 7 months ago

do you need to use v as prefix? in example I always demonstrate without v

alexilyaev commented 7 months ago

Here's the reasoning... Copying a version from the output of bum list-remote

$ bum list-remote
  v1.0.25
  v1.0.24
  v1.0.23
  v1.0.22
  v1.0.21
  v1.0.20
  ...

Pasting into bum use

$ bum use v1.0.25

For reference, fnm supports a version with v for fnm use

owenizedd commented 1 month ago

Make sense! Sorry for delayed this is fixed now we support both with or without v prefix :)