Closed Bug 579862 Opened 10 years ago Closed 10 years ago

Consider using SETLOCAL in start-*.bat

Categories

(mozilla.org :: MozillaBuild, task)

x86
Windows XP
task
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: neil, Assigned: neil)

Details

Attachments

(1 file)

So that you don't pollute the parent command prompt's environment.
[guess-msvc.bat gets confused if you run it twice]
Attached patch Possible patchSplinter Review
Attachment #458304 - Flags: review?(ted.mielczarek)
Comment on attachment 458304 [details] [diff] [review]
Possible patch

I...don't actually know what this does.
C:\>SETLOCAL /?
Begins localization of environment changes in a batch file.  Environment
changes made after SETLOCAL has been issued are local to the batch file.
ENDLOCAL must be issued to restore the previous settings.  When the end
of a batch script is reached, an implied ENDLOCAL is executed for any
outstanding SETLOCAL commands issued by that batch script.
With bug 579860, does this mean that none of the variables set in the start-msvc* batch files will persist into the bash environment? Or do they make it there, and just not afterwards if you run it from a command prompt?
Assignee: nobody → neil
SETLOCAL only affects the calling command prompt. Applications run with or without start inherit environment variables from the batch file as normal.
Comment on attachment 458304 [details] [diff] [review]
Possible patch

Okay.
Attachment #458304 - Flags: review?(ted.mielczarek) → review+
Keywords: checkin-needed
http://hg.mozilla.org/mozilla-build/rev/a9eac499f12e
Status: NEW → RESOLVED
Closed: 10 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.