nixos-rebuild: Handle .version-suffix not being writable

Reported by @vcunat.
This commit is contained in:
Eelco Dolstra 2013-06-05 17:09:34 +02:00
parent d210f30fa7
commit 365307ada1

View File

@ -141,7 +141,7 @@ fi
if nixos=$(nix-instantiate --find-file nixos "${extraBuildFlags[@]}"); then
suffix=$(@shell@ $nixos/modules/installer/tools/get-version-suffix "${extraBuildFlags[@]}")
if [ -n "$suffix" ]; then
echo -n "$suffix" > "$nixos/.version-suffix"
echo -n "$suffix" > "$nixos/.version-suffix" || true
fi
fi