env |= {"MKOSI_HOST_DISTRIBUTION": str(hd)}
if hr:
env |= {"MKOSI_HOST_RELEASE": hr}
- if config.tools_tree:
- env |= {"MKOSI_DEFAULT_TOOLS_TREE_PATH": os.fspath(config.tools_tree)}
+ if config.tools() != Path("/"):
+ env |= {"MKOSI_DEFAULT_TOOLS_TREE_PATH": os.fspath(config.tools())}
cmdline = [*args.cmdline]
if config.get("tools_tree") == Path("default"):
if in_sandbox():
- config["tools_tree"] = os.environ["MKOSI_DEFAULT_TOOLS_TREE_PATH"]
+ config["tools_tree"] = Path(os.environ["MKOSI_DEFAULT_TOOLS_TREE_PATH"])
else:
tools = finalize_default_tools(context, config, configdir=configdir, resources=resources)
config["tools_tree"] = tools.output_dir_or_cwd() / tools.output