From 9b9d99904a5849b7467b75e25fbc7f5b58b329d3 Mon Sep 17 00:00:00 2001 From: uprightbass360 Date: Sat, 27 Dec 2025 16:45:50 -0500 Subject: [PATCH] cleans up env generation and dropps disabled flags --- scripts/python/modules.py | 7 +------ setup.sh | 6 +++++- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/scripts/python/modules.py b/scripts/python/modules.py index fda61c5..b7158a6 100755 --- a/scripts/python/modules.py +++ b/scripts/python/modules.py @@ -371,12 +371,7 @@ def build_state(env_path: Path, manifest_path: Path) -> ModuleCollectionState: for unknown_key in extra_env_modules: warnings.append(f".env defines {unknown_key} but it is missing from the manifest") - # Warn if manifest entry lacks .env toggle (skip blocked modules) - for module in modules: - if not module.blocked and module.key not in env_map and module.key not in os.environ: - warnings.append( - f"Manifest includes {module.key} but .env does not define it (defaulting to 0)" - ) + # Skip warnings for missing modules - they default to disabled (0) as intended return ModuleCollectionState( manifest_path=manifest_path, diff --git a/setup.sh b/setup.sh index 698be56..034e5e3 100755 --- a/setup.sh +++ b/setup.sh @@ -1724,7 +1724,11 @@ EOF echo echo "# Modules" for module_key in "${MODULE_KEYS[@]}"; do - printf "%s=%s\n" "$module_key" "${!module_key:-0}" + local module_value="${!module_key:-0}" + # Only write enabled modules (value=1) to .env + if [ "$module_value" = "1" ]; then + printf "%s=%s\n" "$module_key" "$module_value" + fi done cat <