Skip to content

Commit 0b69639

Browse files
author
CI Builder
committed
ci: fail when modules contain unmapped top-level files that would pollute C:\Users\Usuario
1 parent a86a6fb commit 0b69639

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,14 +173,15 @@ jobs:
173173
while IFS= read -r -d $'\0' f; do
174174
fname=$(basename "$f")
175175
if [[ ! "$fname" =~ $ALLOWED ]] && [[ ! "$fname" =~ ^\..+ ]]; then
176-
echo "WARNING: Module $m contains root-level file that may install to \$HOME (installer will dotify or map it): $fname" >&2
177-
# do not fail CI — installer will handle mapping or create a dotfile in $HOME
178-
WARN=1
176+
echo "ERROR: Module $m contains root-level file that may install to \$HOME and is not declared in install-mappings.yml: $fname" >&2
177+
echo "Offending path: $m/$fname" >&2
178+
FAIL=1
179179
fi
180180
done < <(find "$m" -maxdepth 1 -type f -print0 || true)
181181
done
182-
if [ "$WARN" -eq 1 ]; then
183-
echo "Top-level files detected in modules. The installer will dotify or map known files; consider adding a mapping if necessary." >&2
182+
if [ "$FAIL" -eq 1 ]; then
183+
echo "Top-level files detected in modules that could pollute \$HOME. Please add a mapping in install-mappings.yml or rename/change the root file to a dotfile." >&2
184+
exit 1
184185
fi
185186
fi
186187
- name: Enforce mapping coverage for module root files

0 commit comments

Comments
 (0)