cleans up env generation and dropps disabled flags

This commit is contained in:
uprightbass360
2025-12-27 16:45:50 -05:00
committed by Deckard
parent 690ee4317c
commit 9b9d99904a
2 changed files with 6 additions and 7 deletions

View File

@@ -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,

View File

@@ -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 <<EOF
MODULES_REBUILD_SOURCE_PATH=$MODULES_REBUILD_SOURCE_PATH