Packages
Library for accessibility snapshot testing in Phoenix applications using axe-core and Playwright.
Current section
Files
Jump to
Current section
Files
lib/system.ex
defmodule Excessibility.System do
@moduledoc """
Opens a file using the default browser across OS types.
"""
@behaviour Excessibility.SystemBehaviour
def open_with_system_cmd(path) do
cmd =
case :os.type() do
{:unix, :darwin} -> "open"
{:unix, _} -> "xdg-open"
{:win32, _} -> "start"
end
System.cmd(cmd, [path])
end
end