Skip to content

Commit f9b23c5

Browse files
committed
Set MOZ_DISABLE_AUTO_SAFE_MODE=1 when doing emrun browser runs (https://bugzilla.mozilla.org/show_bug.cgi?id=745154).
1 parent 0ef0a78 commit f9b23c5

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

emrun

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -929,6 +929,12 @@ def browser_display_name(browser):
929929
return 'Apple Safari'
930930
return browser
931931

932+
def subprocess_env():
933+
e = os.environ.copy()
934+
# https://bugzilla.mozilla.org/show_bug.cgi?id=745154
935+
e['MOZ_DISABLE_AUTO_SAFE_MODE'] = '1'
936+
return e
937+
932938
# Removes a directory tree even if it was readonly, and doesn't throw exception on failure.
933939
def remove_tree(d):
934940
os.chmod(d, stat.S_IWRITE)
@@ -1207,7 +1213,7 @@ def main():
12071213
logv("Executing %s" % ' '.join(browser))
12081214
if browser[0] == 'cmd':
12091215
serve_forever = True # Workaround an issue where passing 'cmd /C start' is not able to detect when the user closes the page.
1210-
browser_process = subprocess.Popen(browser)
1216+
browser_process = subprocess.Popen(browser, env=subprocess_env())
12111217
if options.kill_on_exit:
12121218
atexit.register(kill_browser_process)
12131219
# For Android automation, we execute adb, so this process does not represent a browser and no point killing it.

0 commit comments

Comments
 (0)