flofreud / posh-gvm

GVM for Powershell
Apache License 2.0
210 stars 60 forks source link

Install does not execute `use` #2

Closed pledbrook closed 10 years ago

pledbrook commented 10 years ago

I successfully installed posh-gvm and ran the command

gvm install groovy 2.3.1

That proceeded to download and install the corresponding version of Groovy, as you'd expect. When I was then asked whether I want to use that version of Groovy, I simply pressed the return key:

Do you want groovy 2.3.1 to be set as default? (Y/n):

However, groovy could not be found on the path until I executed gvm use. I think there is a missing question here asking whether the user wants to use the newly installed version. I'm actually not sure right now, so I'll check against standard gvm.

pledbrook commented 10 years ago

So I've just tested gvm on Mac OS X and it seems that the default command implicitly calls use. That appears to be missing from posh-gvm.

flofreud commented 10 years ago

The press of return is interpreted as 'no' which is obviously wrong and cause that you have no default version of groovy.

If you execute

gvm default groovy 2.3.1

it will work as expected.

The use of

gvm use groovy 2.3.1

will only be applied to the current shell and be lost in a new started shell.

I will push a fix for defaulting to 'yes' instead of 'no'

Thanks for your help. To get the fix please see: https://github.com/flofreud/posh-gvm#update