rustup update doesn't do anything if no versions are installed

This commit is contained in:
Bryan Stitt 2023-06-25 21:35:55 -07:00
parent 8815b5c8cd
commit 0ac25c1a90

@ -26,13 +26,13 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
# install rustup # install rustup
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none --profile=minimal
# install our desired version of rust # run a cargo command which install our desired version of rust
COPY rust-toolchain.toml ./ COPY rust-toolchain.toml ./
RUN --mount=type=cache,target=/usr/local/cargo/registry \ RUN --mount=type=cache,target=/usr/local/cargo/registry \
\ \
rustup update cargo check || [ "$?" -eq 101 ]
# a next-generation test runner for Rust projects. # a next-generation test runner for Rust projects.
# We only pay the installation cost once, # We only pay the installation cost once,