dvm icon indicating copy to clipboard operation
dvm copied to clipboard

Discussion - Linking vs Setting env PATH to set the desired version

Open PaulThompson opened this issue 2 years ago • 0 comments

I notice that selecting the desired version works by using the filesystem to link the desired version into place.

This means that the effect of selecting a particular deno version is persistent and is shared by all shells/processes for that user (assuming the usual setup where a user has ~/.dvm/bin on the PATH).

A different method would be to manipulate the environment variable PATH of the current shell, so it would select the desired deno version only for one particular shell and later subprocesses. This is the method used by https://github.com/ghosind/dvm

Different trade-off depending on whether users would expect a dvm use to have a user-wide global persistent effect or whether the choice should be scoped to the current environment.

Use case for the latter could be when a user has different projects that need different deno versions and they run concurrently.

PaulThompson avatar Jun 19 '23 02:06 PaulThompson