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

View file

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