Skip to content

Commit aacbb9a

Browse files
authored
Add support for emrun --browser to point to a macOS browser app root path (#26928)
The convention taken for `EMTEST_BROWSER` is to have it point to the macOS app, and not the path to the executable inside the app. Fix emrun to also use this same convention. Fixes test `emrun.test_emrun` on macOS, when `EMTEST_BROWSER=/Applications/Safari.app` http://clbri.com:8010/api/v2/logs/434413/raw_inline
1 parent d124ba1 commit aacbb9a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

emrun.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1609,6 +1609,10 @@ def run(args): # noqa: C901, PLR0912, PLR0915
16091609

16101610
options = emrun_options = parse_args(args)
16111611

1612+
if MACOS and options.browser.endswith('.app') and not options.browser.startswith('open'):
1613+
options.browser_args = f'--new --fresh --background -a {options.browser} {options.browser_args}'
1614+
options.browser = 'open'
1615+
16121616
if options.android_tunnel:
16131617
options.android = True
16141618

0 commit comments

Comments
 (0)