contrib: check if the user has cargo-public-api
This commit is contained in:
parent
7e8d4615db
commit
04852958b9
|
@ -22,6 +22,7 @@ export LC_ALL=C
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
need_nightly
|
need_nightly
|
||||||
|
need_cargo_public_api
|
||||||
|
|
||||||
generate_api_files "hashes"
|
generate_api_files "hashes"
|
||||||
generate_api_files "io"
|
generate_api_files "io"
|
||||||
|
@ -81,6 +82,13 @@ need_nightly() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
need_cargo_public_api() {
|
||||||
|
if command -v cargo-public-api > /dev/null; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
err "cargo-public-api is not installed; please run 'cargo +nightly install cargo-public-api --locked'"
|
||||||
|
}
|
||||||
|
|
||||||
err() {
|
err() {
|
||||||
echo "$1" >&2
|
echo "$1" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in New Issue