Skip to content

Commit c4caf77

Browse files
committed
show-utils.sh: fix jq query
1 parent 82550b4 commit c4caf77

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

util/show-utils.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,5 @@ cd "${project_main_dir}" &&
3333
echo "WARN: missing \`jq\` (install with \`sudo apt install jq\`); falling back to default (only fully cross-platform) utility list" 1>&2
3434
echo "$default_utils"
3535
else
36-
cargo metadata "$@" --format-version 1 | jq -r "[.resolve.nodes[] | { id: .id, deps: [.deps[] | { name:.name, pkg:.pkg }] }] | .[] | select(.id|startswith(\"coreutils\")) | [.deps[] | select((.name|startswith(\"uu_\")) or (.pkg|startswith(\"uu_\")))] | [.[].pkg | match(\"^\\\w+\";\"g\")] | [.[].string | sub(\"^uu_\"; \"\")] | sort | join(\" \")"
37-
# cargo metadata "$@" --format-version 1 | jq -r "[.resolve.nodes[] | { id: .id, deps: [.deps[] | { name:.name, pkg:.pkg }] }] | .[] | select(.id|startswith(\"coreutils\")) | [.deps[] | select((.name|startswith(\"uu_\")) or (.pkg|startswith(\"uu_\")))] | [.[].pkg | match(\"^\\\w+\";\"g\")] | [.[].string] | sort | join(\" \")"
36+
cargo metadata "$@" --format-version 1 | jq -r "[.resolve.nodes[] | select(.id|match(\".*coreutils#\\\d+\\\.\\\d+\\\.\\\d+\")) | .deps[] | select(.pkg|match(\"uu_\")) | .name | sub(\"^uu_\"; \"\")] | sort | join(\" \")"
3837
fi

0 commit comments

Comments
 (0)