Skip to content

Commit

Permalink
Tweak script
Browse files Browse the repository at this point in the history
features-related flags are unneeded when --no-deps is used.
  • Loading branch information
taiki-e committed Oct 18, 2023
1 parent a8f9216 commit 6b2e962
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/tidy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ if [[ -n "$(git ls-files '*.rs')" ]]; then
done
# Make sure that public Rust crates don't contain executables.
failed_files=''
metadata=$(cargo metadata --format-version=1 --all-features --no-deps)
metadata=$(cargo metadata --format-version=1 --no-deps)
has_public_crate=''
for id in $(jq <<<"${metadata}" '.workspace_members[]'); do
pkg=$(jq <<<"${metadata}" ".packages[] | select(.id == ${id})")
Expand Down Expand Up @@ -314,7 +314,7 @@ if [[ -f .cspell.json ]]; then
if [[ "${manifest_path}" != "Cargo.toml" ]] && ! grep -Eq '\[workspace\]' "${manifest_path}"; then
continue
fi
metadata=$(cargo metadata --format-version=1 --all-features --no-deps --manifest-path "${manifest_path}")
metadata=$(cargo metadata --format-version=1 --no-deps --manifest-path "${manifest_path}")
for id in $(jq <<<"${metadata}" '.workspace_members[]'); do
dependencies+="$(jq <<<"${metadata}" ".packages[] | select(.id == ${id})" | jq -r '.dependencies[].name')"$'\n'
done
Expand Down

0 comments on commit 6b2e962

Please sign in to comment.