Skip to content

Commit

Permalink
fix: chrome env check (#3841)
Browse files Browse the repository at this point in the history
Windows only. Problem posted in #3761
  • Loading branch information
mscolnick authored Feb 18, 2025
1 parent d31ba11 commit d298db0
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions marimo/_utils/health.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ def get_chrome_version_windows() -> Optional[str]:
stdout, stderr = process.communicate()
if stderr:
return None
return stdout.strip().split()[-1]
parts = stdout.strip().split()
if parts:
return parts[-1]
return None

def get_chrome_version_mac() -> Optional[str]:
process = subprocess.Popen(
Expand All @@ -110,7 +113,10 @@ def get_chrome_version_mac() -> Optional[str]:
stdout, stderr = process.communicate()
if stderr:
return None
return stdout.strip().split()[-1]
parts = stdout.strip().split()
if parts:
return parts[-1]
return None

def get_chrome_version_linux() -> Optional[str]:
process = subprocess.Popen(
Expand All @@ -122,7 +128,10 @@ def get_chrome_version_linux() -> Optional[str]:
stdout, stderr = process.communicate()
if stderr:
return None
return stdout.strip().split()[-1]
parts = stdout.strip().split()
if parts:
return parts[-1]
return None

try:
if sys.platform.startswith("win32"):
Expand Down

0 comments on commit d298db0

Please sign in to comment.