Skip to content

Commit

Permalink
Marionette: Fix Firefox location discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Dec 3, 2024
1 parent f353072 commit ba21a00
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 4 additions & 3 deletions grafanimate/marionette.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,11 @@ def configure_marionette(self):

@classmethod
def find_firefox(cls):
candidates = [
candidates = []
candidates += where.where("firefox-bin") + where.where("firefox-esr")
candidates += [
os.environ.get("FIREFOX_BIN"),
where.where("firefox-bin"),
where.where("firefox-esr"),
"/Applications/Firefox.app/Contents/MacOS/firefox",
"/Applications/Firefox.app/Contents/MacOS/firefox-bin",
]
firefox = find_program_candidate(candidates)
Expand Down
2 changes: 2 additions & 0 deletions grafanimate/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ def read_list(data, separator=","):

def find_program_candidate(candidates):
for candidate in candidates:
if candidate is None:
continue
if os.path.isfile(candidate):
return candidate

Expand Down

0 comments on commit ba21a00

Please sign in to comment.