Fail if cargo about emits warnings (#24996)

Warnings are emitted despite --fail have no license field like `ring`

Release Notes:

- N/A
This commit is contained in:
Michael Sloan 2025-02-17 00:05:01 -07:00 committed by GitHub
parent 8b088b3985
commit bcba0b92ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 24 additions and 2 deletions

View file

@ -14,10 +14,21 @@ else
fi
echo "Generating cargo licenses"
stderr_file=$(mktemp)
cargo about generate \
--fail \
-c script/licenses/zed-licenses.toml \
script/licenses/template.csv.hbs \
2> >(tee "$stderr_file") \
| awk 'NR==1{print;next} NF{print | "sort"}' \
> $OUTPUT_FILE
echo "Completed. See $OUTPUT_FILE"
# Check that there are no warnings.
if echo "$about_stderr" | grep -v "\[WARN\]" > /dev/null; then
echo "Error: License check failed - warnings found" >&2
exit 1
fi
echo "generate-licenses-csv completed. See $OUTPUT_FILE"