From ef081fe72a98fd814e8a1b636d49c0bf5a70bcf9 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 19 Jan 2025 00:17:29 +0100 Subject: [PATCH] fix the show-utils script to list all the tools --- util/show-utils.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/util/show-utils.sh b/util/show-utils.sh index 0a41698d930..0a22a3ddbb3 100755 --- a/util/show-utils.sh +++ b/util/show-utils.sh @@ -33,10 +33,10 @@ cd "${project_main_dir}" && echo "WARN: missing \`jq\` (install with \`sudo apt install jq\`); falling back to default (only fully cross-platform) utility list" 1>&2 echo "$default_utils" else - # Find 'coreutils' id with regex - # with cargo v1.76.0, id = "coreutils 0.0.26 (path+file://)" - # with cargo >= v1.77.0 - # - if local path != '<...>/coreutils' id = "path+file://#coreutils@0.0.26" - # - if local path == '<...>/coreutils' id = "path+file:///coreutils#0.0.26" - 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(" ")' + cargo metadata "$@" --format-version 1 | jq -r '[.packages[] + | select(.default_run == "coreutils") + | .dependencies[] + | select(.name | startswith("uu_")) + | .name | sub("^uu_"; "")] + | sort | join(" ")' fi