Skip to content

Commit a6bc477

Browse files
Copilotgfauredev
andcommitted
fix: use nullglob for web-asset stash loop in mkAndroidBuilder"
Agent-Logs-Url: https://github.com/gfauredev/LogOut/sessions/e5a25fad-19c7-4453-a825-a538c2380143 Co-authored-by: gfauredev <19304085+gfauredev@users.noreply.github.com>
1 parent cc059fb commit a6bc477

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

flake.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,12 @@
275275
# These files (service worker, web icons, 404 page) are irrelevant on
276276
# the Android platform and would only inflate the APK size.
277277
_web_stash=$(mktemp -d)
278+
# nullglob ensures the loop is skipped when no icons exist.
279+
shopt -s nullglob
278280
for _f in public/sw.js public/404.html public/icon-*.png; do
279281
[ -f "$_f" ] && mv "$_f" "$_web_stash/"
280282
done
283+
shopt -u nullglob
281284
# Ensure web-only assets are always restored, even on failure.
282285
_restore_web_assets() {
283286
mv "$_web_stash"/* public/ 2>/dev/null || true

0 commit comments

Comments
 (0)