Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
Use jq's alternative operator (//)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoqun committed Jul 1, 2023
1 parent 58013c2 commit fd2d6cf
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions scripts/check-dev-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,12 @@ case "$mode" in
;;
esac

# cargo metadata uses null for normal dep. while "dev", "build" are natually
# used by other dep. kinds.
declare -r normal_dependency="null";

if [[ $mode = "tree" || $mode = "full" ]]; then
query=$(cat <<EOF
.packages
| map(.name as \$crate
| (.dependencies
| map(select(.kind == ${normal_dependency}))
| map(select((.kind // "normal") == "normal"))
| map({
"crate" : \$crate,
"dependency" : .name,
Expand Down

0 comments on commit fd2d6cf

Please sign in to comment.