fix(create-report): do not error if an output is missing #4
1 changed files with 3 additions and 3 deletions
|
@ -5,14 +5,14 @@ set -eu
|
||||||
echo 'Retrieving Flake information' >&2
|
echo 'Retrieving Flake information' >&2
|
||||||
flake_info=$(nix flake show --json 2>/dev/null)
|
flake_info=$(nix flake show --json 2>/dev/null)
|
||||||
packages=$(
|
packages=$(
|
||||||
jq --raw-output '.packages."x86_64-linux" | keys[]' <<-EOF
|
jq --raw-output '.packages."x86_64-linux" | select(. != null) | keys[]' <<-EOF
|
||||||
$flake_info
|
$flake_info
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
echo "Packages:" >&2
|
echo "Packages:" >&2
|
||||||
echo "$packages" >&2
|
echo "$packages" >&2
|
||||||
configurations=$(
|
configurations=$(
|
||||||
jq --raw-output '.nixosConfigurations | keys[]' <<-EOF
|
jq --raw-output '.nixosConfigurations | select(. != null) | keys[]' <<-EOF
|
||||||
$flake_info
|
$flake_info
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
|
@ -67,4 +67,4 @@ markdown() {
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
markdown > size-report.md
|
markdown >size-report.md
|
||||||
|
|
Loading…
Reference in a new issue