Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Rust toolchain environment issue on RustRover #1497

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions chunks/lang-rust/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ ENV PATH=$HOME/.cargo/bin:$PATH
RUN curl -fsSL https://sh.rustup.rs | sh -s -- -y --no-modify-path --default-toolchain ${RUST_VERSION} \
-c rls rust-analysis rust-src rustfmt clippy \
&& for cmp in rustup cargo; do rustup completions bash "$cmp" > "$HOME/.local/share/bash-completion/completions/$cmp"; done \
&& printf '%s\n' 'export CARGO_HOME=/workspace/.cargo' \
'mkdir -m 0755 -p "$CARGO_HOME/bin" 2>/dev/null' \
'export PATH=$CARGO_HOME/bin:$PATH' \
'test ! -e "$CARGO_HOME/bin/rustup" && mv "$(command -v rustup)" "$CARGO_HOME/bin"' > $HOME/.bashrc.d/80-rust \
&& cargo install cargo-watch cargo-edit cargo-workspaces \
&& rm -rf "$HOME/.cargo/registry" # This registry cache is now useless as we change the CARGO_HOME path to `/workspace`

# Helpful for Gitpod prebuilds
ENV CARGO_HOME=/workspace/.cargo
ENV CARGO_INSTALL_ROOT=$HOME/.cargo
Loading