mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-02 10:03:28 +00:00
Improve error message with rustup not found (#1659)
* Improve error message with rustup not found * Improve error message with rustup not found on the mobile devices * Fix `err` function in setup.sh Fix `err` function printing repeated error lines --------- Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com>
This commit is contained in:
parent
4c785eaca0
commit
5b09c615c9
|
@ -8,7 +8,7 @@ fi
|
|||
|
||||
err() {
|
||||
for _line in "$@"; do
|
||||
echo "$@" >&2
|
||||
echo "$_line" >&2
|
||||
done
|
||||
exit 1
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ if [ "${CI:-}" != "true" ]; then
|
|||
'https://pnpm.io/installation'
|
||||
fi
|
||||
|
||||
if ! has rustup rustc cargo; then
|
||||
if ! has rustc cargo; then
|
||||
err 'Rust was not found.' \
|
||||
"Ensure the 'rustc' and 'cargo' binaries are in your \$PATH." \
|
||||
'https://rustup.rs'
|
||||
|
@ -74,6 +74,12 @@ if [ "${1:-}" = "mobile" ]; then
|
|||
"Ensure 'python3' is available in your \$PATH and try again."
|
||||
fi
|
||||
|
||||
if ! has rustup; then
|
||||
err 'Rustup was not found. It is required for cross-compiling rust to mobile targets.' \
|
||||
"Ensure the 'rustup' binary is in your \$PATH." \
|
||||
'https://rustup.rs'
|
||||
fi
|
||||
|
||||
# Android targets
|
||||
echo "Installing Android targets for Rust..."
|
||||
|
||||
|
|
Loading…
Reference in a new issue