Restore netalertx/ folder and fix daily_README workflow rename collision

Commit 734a824 was triggered by the daily_README.yaml workflow which
temporarily renames addon folders to their .name for README generation.
Both netalertx and netalertx_fa share name: NetAlertX, causing mv to
move netalertx inside the already-renamed netalertx_fa directory.

Fix: add [ ! -e "$NAME" ] guard to prevent rename when target exists.

Co-authored-by: alexbelgium <44178713+alexbelgium@users.noreply.github.com>
Agent-Logs-Url: https://github.com/alexbelgium/hassio-addons/sessions/b23b6b99-d4da-4c4e-926f-4067af6f16a0
This commit is contained in:
copilot-swe-agent[bot]
2026-03-20 19:27:26 +00:00
parent 58d8591dfb
commit 5640de85e9
14 changed files with 1 additions and 2 deletions

View File

@@ -87,7 +87,7 @@ jobs:
IFS='|' read -r CONFIG TYPE <<<"$(get_config "$f")"
if [ -n "$CONFIG" ]; then
NAME="$(get_raw '.name' "$TYPE" "$CONFIG")"
if [ -n "${NAME:-}" ] && [ "$f" != "$NAME" ]; then
if [ -n "${NAME:-}" ] && [ "$f" != "$NAME" ] && [ ! -e "$NAME" ]; then
echo "$f" > "$f/oldname"
mv "$f" "$NAME"
fi