nvs icon indicating copy to clipboard operation
nvs copied to clipboard

nvs rm multiple versions

Open brody4hire opened this issue 7 years ago • 2 comments

When I tried nvs rm with multiple version numbers it only removed the first one and ignored the rest.

It would be better for nvs rm to show an error message in this case.

It would be even better for nvs rm to support multiple version numbers.

As a general note I would like to thanks @jasongin again for such nice work. I am really happy to have it all work the same way on macOS & Windows and have abandoned the other Node version managers.

brody4hire avatar May 09 '17 12:05 brody4hire

Also if I do something like nvs rm boron it only removes the latest Boron version and leaves the others in place. For example:

C:\Users\Chris
λ nvs ls
  node/6.10.2/x64 (Boron)
  node/6.10.1/x64 (Boron)
 >node/4.8.3/x64 (Argon)

C:\Users\Chris
λ nvs rm boron
- C:\Users\Chris\nvs\node\6.10.2\x64

C:\Users\Chris
λ nvs ls
  node/6.10.1/x64 (Boron)
 >node/4.8.3/x64 (Argon)

brody4hire avatar May 09 '17 12:05 brody4hire

It would be better for nvs rm to show an error message in this case.

Agreed. This is a general issue with all commands. Instead of ignoring additional unsupported/invalid arguments they should print an error and command usage help.

It would be even better for nvs rm to support multiple version numbers.

Maybe. I could imagine both nvs add and nvs rm accepting multiple version arguments. But it seems like not a big deal when it's easy enough to use multiple commands instead.

if I do something like nvs rm boron it only removes the latest Boron version and leaves the others in place

For all nvs commands, when an LTS tag (such as "boron") or partial version (such as "6") matches multiple available versions, then the latest matching version is selected. I'd be concerned that having nvs rm affect all matching versions instead of just the latest would be unexpected, since it would be inconsistent with other commands. Maybe there could be an option to match all? Something like: nvs rm -a boron

jasongin avatar May 09 '17 17:05 jasongin