Merge pull request #180 from pikasTech/fix/code-queue-rustup-path-refresh

修复 Code Queue rustup PATH 刷新
This commit is contained in:
Lyon
2026-05-24 15:14:07 +08:00
committed by GitHub
@@ -63,7 +63,7 @@ RUN command -v xauth >/dev/null 2>&1 \
RUN (command -v rustc >/dev/null 2>&1 && rustc --version | awk '{ split($2, v, "."); exit ! (v[1] > 1 || (v[1] == 1 && v[2] >= 86)) }' && command -v rustfmt >/dev/null 2>&1) \
|| (apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates curl rustup \
&& env -u HTTP_PROXY -u HTTPS_PROXY -u http_proxy -u https_proxy bash -lc 'set -e; for attempt in 1 2 3; do rustup toolchain install stable --profile minimal && break; if [ "$attempt" = "3" ]; then exit 1; fi; echo "rustup_toolchain_retry=$attempt" >&2; sleep $((attempt * 15)); done; rustup default stable; for attempt in 1 2 3; do rustup component add rustfmt && break; if [ "$attempt" = "3" ]; then exit 1; fi; echo "rustup_rustfmt_retry=$attempt" >&2; sleep $((attempt * 15)); done; hash -r 2>/dev/null || true' \
&& env -u HTTP_PROXY -u HTTPS_PROXY -u http_proxy -u https_proxy bash -lc 'set -e; for attempt in 1 2 3; do rustup toolchain install stable --profile minimal && break; if [ "$attempt" = "3" ]; then exit 1; fi; echo "rustup_toolchain_retry=$attempt" >&2; sleep $((attempt * 15)); done; . "$CARGO_HOME/env" 2>/dev/null || true; hash -r 2>/dev/null || true; rustup default stable; for attempt in 1 2 3; do rustup component add rustfmt && break; if [ "$attempt" = "3" ]; then exit 1; fi; echo "rustup_rustfmt_retry=$attempt" >&2; sleep $((attempt * 15)); done' \
&& rustc --version | awk '{ split($2, v, "."); exit ! (v[1] > 1 || (v[1] == 1 && v[2] >= 86)) }' \
&& rustfmt --version >/dev/null \
&& apt-get clean \