openDefaultBrowser now works on OSX (#13892) [backport]

(cherry picked from commit e6d870896b)
This commit is contained in:
Timothee Cour
2020-04-05 23:26:12 -07:00
committed by narimiran
parent 2dcf32f5c8
commit 99e6d328ec

View File

@@ -20,9 +20,9 @@ else:
import os, osproc
const osOpenCmd* =
when defined(macos) or defined(windows): "open" else: "xdg-open" ## \
when defined(macos) or defined(macosx) or defined(windows): "open" else: "xdg-open" ## \
## Alias for the operating system specific *"open"* command,
## ``"open"`` on MacOS and Windows, ``"xdg-open"`` on Linux, BSD, etc.
## ``"open"`` on OSX, MacOS and Windows, ``"xdg-open"`` on Linux, BSD, etc.
proc openDefaultBrowser*(url: string) =
## opens `url` with the user's default browser. This does not block.