From 52cd9e14254a7adaf2c89544064a088634bb8225 Mon Sep 17 00:00:00 2001 From: selikhov Date: Sun, 4 Oct 2026 14:42:25 +0300 Subject: [PATCH] own-crates.sh: print the crate list without line breaks On the Windows CI runner jq ends its lines with \r\n; `tr '\n' ' '` removed only the \n, so every crate name kept a \r and cargo refused `voelin-android\r` as a package name, failing the Windows clippy job. `jq -j` writes the list with no line breaks at all. Co-Authored-By: Claude Opus 5.5 --- scripts/own-crates.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/own-crates.sh b/scripts/own-crates.sh index 087baf4..cb02ff4 100755 --- a/scripts/own-crates.sh +++ b/scripts/own-crates.sh @@ -1,10 +1,10 @@ #!/usr/bin/env bash # Print `-p ` for every workspace crate outside the vendored crates/proto # and third_party (manifest paths with / or \ separators, for Windows), -# for commands that apply strict checks to our own code only: +# on one line, for commands that apply strict checks to our own code only +# (`jq -j`: no line breaks at all, as jq on Windows ends lines with \r\n): # cargo clippy $(scripts/own-crates.sh) --all-targets --no-deps -- -D warnings set -euo pipefail cd "$(dirname "$0")/.." cargo metadata --no-deps --format-version 1 | - jq -r '.packages[] | select(.manifest_path | gsub("\\\\"; "/") | (contains("/crates/proto/") or contains("/third_party/")) | not) | "-p \(.name)"' | - tr '\n' ' ' + jq -j '.packages[] | select(.manifest_path | gsub("\\\\"; "/") | (contains("/crates/proto/") or contains("/third_party/")) | not) | "-p \(.name) "'