test icon indicating copy to clipboard operation
test copied to clipboard

Fix path to launch firefox on macOS

Open koji-1009 opened this issue 11 months ago • 3 comments

Fix firefox startup path, as dart test -p firefox can no longer be executed on macOS.

close #2194

I checked the workflow and both macos and firefox are removed from the execution environment. In relation to PR, do I need to add macos and firefox execution patterns to the workflow?


  • [x] I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

koji-1009 avatar Mar 02 '24 08:03 koji-1009

Ah crap, I realize now that this doesn't work for the executables which aren't actually a file path, but instead are an executable name expected to be on your PATH.

Not sure the best way to deal with those, cc @natebosch ideas?

jakemac53 avatar Mar 05 '24 19:03 jakemac53

I don't recall a way to check for an executable on the $PATH in Dart.

If macOS is the only one which needs multiple options today, should we only update the mac behavior to support multiple full paths?

natebosch avatar Mar 05 '24 23:03 natebosch

We can do a workaround in dart_test.yaml, so why not change the default to firefox and have firefox-bin set in an environment that supports the old Firefox? As Firefox browsers are updated, the importance of firefox-bin seems to gradually decrease.

We are able to do a workaround by setting the following yaml.

override_platforms:
  firefox:
    settings:
      executable: 
        mac_os: '/Applications/Firefox.app/Contents/MacOS/firefox-bin'

koji-1009 avatar Mar 06 '24 04:03 koji-1009