goalie.is_system_command

goalie.is_system_command(x: object) bool

Check whether a system command is available on PATH.

Parameters:

x (object) – Command name (e.g. "git").

Returns:

True if the command is found on PATH.

Return type:

bool

Examples

>>> isinstance(is_system_command("python"), bool)
True
>>> is_system_command("nonexistent_cmd_xyz_abc")
False