INNER CODE UNIT · Python
business
WMAL/kodachios · Kodachi-OS-10-stable/open/dock/lib/kodachi_direct.py:622
business = [executable, *argv]
if binding.get("needsSudo") or binding.get("runAsUser"):
if not os.path.isfile(SUDO) or not os.access(SUDO, os.X_OK):
raise DirectContractError(f"non-interactive privilege tool is absent: {SUDO}")
privileged = [SUDO, "-n"]
if binding.get("runAsUser"):
privileged.extend(["-u", binding["runAsUser"]])
return [*privileged, *business]
return business
_REGISTRY = None
def registry(path=None, reload=False):
global _REGISTRY
if path is not None:
return DirectOperations(path)