mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-12-02 15:27:59 +03:00
image-builder: Prevent bogus empty filesystems
This commit is contained in:
parent
02e1c0a62e
commit
cad65d269e
@ -238,6 +238,19 @@ in
|
||||
(
|
||||
cd "$files"
|
||||
${config.populateCommands}
|
||||
|
||||
# This also activates dotglob automatically.
|
||||
# Using this means hidden files will be added too.
|
||||
GLOBIGNORE=".:.."
|
||||
|
||||
if (( $(find -maxdepth 1 | wc -l) == 1 )); then
|
||||
(set -x; ls -l)
|
||||
|
||||
echo ""
|
||||
echo "ERROR: populatePhase produced no files."
|
||||
echo " tip: using mkForce or mkDefault at different places may unexpected overwrite values."
|
||||
exit 2
|
||||
fi
|
||||
)
|
||||
'';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user