fix(check-deployment): fix nvd invocation and diff flag

This commit is contained in:
sinavir 2024-01-07 10:20:46 +01:00
parent cbdf1e42aa
commit 19c4176015
2 changed files with 4 additions and 3 deletions

View file

@ -13,7 +13,7 @@ By default check all nodes
where:
-h Show this help text
--dryrun Print the nixos-anywhere invocation
--diff Show diff with nvd
Exemple:
check-deployment web01"
@ -96,9 +96,9 @@ while IFS=$'\n' read -r c; do
if [ "$expected_path" == "$current_path" ] ; then
echo "$machine -> OK"
elif [[ -z ${diff-} ]] ; then
nix-store -r "$drv_path"
elif [[ -n ${diff-} ]] ; then
nix-copy-closure --from "root@$domain" "$current_path"
nix-store -r "$drv_path"
echo "$machine -> error. nvd output:"
@nvd@/bin/nvd diff "$expected_path" "$current_path"
return_status=1

View file

@ -6,6 +6,7 @@ let
bash
colmena
coreutils
nvd
git
jq;
};