1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 from pathlib
import Path
9 from mach
.decorators
import Command
, CommandArgument
12 @Command("xpcshell", category
="misc", description
="Run the xpcshell binary")
14 "args", nargs
=argparse
.REMAINDER
, help="Arguments to provide to xpcshell"
16 def xpcshell(command_context
, args
):
17 dist_bin
= Path(command_context
._topobjdir
, "dist", "bin")
18 browser_dir
= dist_bin
/ "browser"
20 if sys
.platform
== "win32":
21 xpcshell
= dist_bin
/ "xpcshell.exe"
23 xpcshell
= dist_bin
/ "xpcshell"
36 return command_context
.run_process(
39 ensure_exit_code
=False,