GVM uses symbolic links to change the current version of Groovy, Grails etc. Specifically, there is a symlink
~/.gvm/grails/current
If the current version of Grails is 2.3.5 this symlink points to
~/.gvm/grails/2.3.5
if you run gvm use grails 2.3.6
GVM changes the symlink to point to
~/.gvm/grails/2.3.6
So the GRAILS_HOME
env var is always pointing at ~/.gvm/grails/current
, but the target of this symlink changes when you run GVM commands.
The Windows filesystem doesn't support symlinks, which is why GVM doesn't work on Windows (though you might be able to run it under Cygwin).