Batch file vagrant.bat
sets both GEM_HOME and GEM_PATH environment variables.
It would be nice of him to restore old values after finishing it's work.
Something like:
:: Save variables
SET "GEM_HOME_SAVED=%GEM_HOME%"
SET "GEM_PATH_SAVED=%GEM_PATH%"
...
and at the end of a file
...
:: Restore variables
SET "GEM_HOME=%GEM_HOME_SAVED%"
SET "GEM_PATH=%GEM_PATH_SAVED%"
SET "GEM_HOME_SAVED="
SET "GEM_PATH_SAVED="
:: Restore environment variables GEM_HOME and GEM_PATH (read from .gemrc)
::
:: Restore variables from .gemrc
:: for /f "tokens=*" %%f in ('gem env gemhome') do @set GEM_HOME=%%f
:: for /f "tokens=*" %%f in ('gem env gempath') do @set GEM_PATH=%%f
Btw: This ::
thing are comments in .bat files. Nicer than REM
.