From 079784836a2b30df8def48a799b6d5e9bc90f942 Mon Sep 17 00:00:00 2001 From: Astro Date: Sun, 25 Sep 2022 22:45:25 +0200 Subject: [PATCH] modules/{autoupdate,microvm-host}: let jq fail --- modules/autoupdate.nix | 4 ++-- modules/microvm-host.nix | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/autoupdate.nix b/modules/autoupdate.nix index fce36ecc..eb8b3302 100644 --- a/modules/autoupdate.nix +++ b/modules/autoupdate.nix @@ -28,7 +28,7 @@ script = '' 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/${config.networking.hostName}/latest | jq -r .buildoutputs.out.path) + NEW=$(curl -sLH "Accept: application/json" https://hydra.hq.c3d2.de/job/c3d2/nix-config/${config.networking.hostName}/latest | jq -er .buildoutputs.out.path) if [ -z "$NEW" ] || [ "$NEW" = "null" ]; then echo "Unable to obtain updated system" exit 1 @@ -82,7 +82,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/${config.networking.hostName}/latest | ${pkgs.jq}/bin/jq -r .buildoutputs.out.path) + NEW=$(curl -sLH "Accept: application/json" https://hydra.hq.c3d2.de/job/c3d2/nix-config/${config.networking.hostName}/latest | ${pkgs.jq}/bin/jq -er .buildoutputs.out.path) if [ -z "$NEW" ] || [ "$NEW" = "null" ]; then echo "Unable to obtain updated system" exit 1 diff --git a/modules/microvm-host.nix b/modules/microvm-host.nix index 72041625..9504d503 100644 --- a/modules/microvm-host.nix +++ b/modules/microvm-host.nix @@ -84,7 +84,7 @@ echo MicroVM $NAME cd /var/lib/microvms/$NAME if [ "$(cat flake)" = "git+https://gitea.c3d2.de/c3d2/nix-config?ref=flake-update" ]; then - NEW=$(curl -sLH "Accept: application/json" https://hydra.hq.c3d2.de/job/c3d2/nix-config/$NAME/latest | ${pkgs.jq}/bin/jq -r .buildoutputs.out.path) + NEW=$(curl -sLH "Accept: application/json" https://hydra.hq.c3d2.de/job/c3d2/nix-config/$NAME/latest | ${pkgs.jq}/bin/jq -er .buildoutputs.out.path) nix copy --from https://nix-serve.hq.c3d2.de $NEW if [ -e booted ]; then