1
0
forked from c3d2/nix-config

modules/autoupdate: catch $NEW==null

This commit is contained in:
Astro 2022-02-08 19:17:44 +01:00
parent efad5c87c1
commit 18b68306d0

View File

@ -28,7 +28,7 @@
script = ''
OLD=$(readlink /run/current-system)
NEW=$(curl -sLH "Accept: application/json" https://hydra.hq.c3d2.de/job/c3d2/nix-config/x86_64-linux.$(hostname)/latest | jq -r .buildoutputs.out.path)
if [ -z "$NEW" ]; then
if [ -z "$NEW" ] || [ "$NEW" = "null" ]; then
echo "Unable to obtain updated system"
exit 1
fi
@ -68,7 +68,7 @@
OLD=$(readlink /run/current-system)
echo Current system: $(basename $OLD)
NEW=$(curl -sLH "Accept: application/json" https://hydra.hq.c3d2.de/job/c3d2/nix-config/x86_64-linux.$(hostname)/latest | ${pkgs.jq}/bin/jq -r .buildoutputs.out.path)
if [ -z "$NEW" ]; then
if [ -z "$NEW" ] || [ "$NEW" = "null" ]; then
echo "Unable to obtain updated system"
exit 1
fi