mirror of
https://github.com/signalapp/libsignal.git
synced 2024-09-20 12:02:18 +02:00
Swift: Add an error message for missing rust-src when using xargo
xargo does print a reasonably nice error for this, but it doesn't mention which toolchain to install rust-src for. Check ourselves so that CocoaPods clients don't have to do something weird like "cd into the package and run rustup there".
This commit is contained in:
parent
d2c34f0f46
commit
5d99e87e2c
@ -99,6 +99,13 @@ if [[ -n "${USE_XARGO:-}" ]]; then
|
||||
printf "\n\t%s\n\n" "cargo install xargo" >&2
|
||||
exit 1
|
||||
fi
|
||||
RUSTUP_TOOLCHAIN=${RUSTUP_TOOLCHAIN:-$(cat ./rust-toolchain)}
|
||||
if ! rustup "+${RUSTUP_TOOLCHAIN}" component list --installed | grep -q rust-src; then
|
||||
echo 'error: rust-src component not installed' >&2
|
||||
echo 'note: get it by running' >&2
|
||||
printf "\n\t%s\n\n" "rustup +${RUSTUP_TOOLCHAIN} component add rust-src" >&2
|
||||
exit 1
|
||||
fi
|
||||
BUILD_CMD=xargo
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user