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

Commit bc215ae

Browse files
committed
Use jq's alternative operator (//)
1 parent 58013c2 commit bc215ae

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

scripts/check-dev-utils.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,12 @@ case "$mode" in
4444
;;
4545
esac
4646

47-
# cargo metadata uses null for normal dep. while "dev", "build" are natually
48-
# used by other dep. kinds.
49-
declare -r normal_dependency="null";
50-
5147
if [[ $mode = "tree" || $mode = "full" ]]; then
5248
query=$(cat <<EOF
5349
.packages
5450
| map(.name as \$crate
5551
| (.dependencies
56-
| map(select(.kind == ${normal_dependency}))
52+
| map(select(.kind // "normal" == "normal"))
5753
| map({
5854
"crate" : \$crate,
5955
"dependency" : .name,

0 commit comments

Comments
 (0)