Subject: | portableshell.bat Recommendation |
Date: | Tue, 29 Nov 2016 19:28:02 -0800 |
To: | bug-Perl-Dist-Strawberry [...] rt.cpan.org |
From: | Lee Thompson <thompsonl [...] logh.net> |
I would recommend adding the following to portableshell.bat
Right after @echo off add the line "setlocal".
This will ensure that any environment variables set by
portableshell.bat go away as soon as the script has exited (which since
there's a cmd /k will be after the exit command is done.)
But should the script not get that far, the user's environment variables
won't have a bunch of extra ones in it (until that command interpreter
is terminated).
so:
@echo off
set drive=%~dp0
...
would become:
@echo off
setlocal
set drive=%~dp0
...
--
Lee Thompson
thompsonl@logh.net