Consider using SETLOCAL in start-*.bat

RESOLVED FIXED

Status

mozilla.org
MozillaBuild
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: neil@parkwaycc.co.uk, Assigned: neil@parkwaycc.co.uk)

Tracking

Details

Attachments

(1 attachment)

(Assignee)

Description

8 years ago
So that you don't pollute the parent command prompt's environment.
[guess-msvc.bat gets confused if you run it twice]
(Assignee)

Comment 1

8 years ago
Created attachment 458304 [details] [diff] [review]
Possible patch
Attachment #458304 - Flags: review?(ted.mielczarek)
Comment on attachment 458304 [details] [diff] [review]
Possible patch

I...don't actually know what this does.
(Assignee)

Comment 3

8 years ago
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
(Assignee)

Comment 5

8 years ago
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+
(Assignee)

Updated

8 years ago
Keywords: checkin-needed
http://hg.mozilla.org/mozilla-build/rev/a9eac499f12e
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.