fix(create-report): do not error if an output is missing #4

Merged
jalil merged 1 commit from fix-script into main 2024-12-15 21:06:20 +01:00

View file

@ -5,14 +5,14 @@ set -eu
echo 'Retrieving Flake information' >&2
flake_info=$(nix flake show --json 2>/dev/null)
packages=$(
jq --raw-output '.packages."x86_64-linux" | keys[]' <<-EOF
jq --raw-output '.packages."x86_64-linux" | select(. != null) | keys[]' <<-EOF
$flake_info
EOF
)
echo "Packages:" >&2
echo "$packages" >&2
configurations=$(
jq --raw-output '.nixosConfigurations | keys[]' <<-EOF
jq --raw-output '.nixosConfigurations | select(. != null) | keys[]' <<-EOF
$flake_info
EOF
)