Skip to content

Commit de5ccb1

Browse files
committed
Workaround #2033
1 parent a56d6ce commit de5ccb1

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

bin/clicksnap-setup

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ fatal() { echo "FATAL [$(basename "$0")]: $*" 1>&2; exit 1; }
1212
warn() { echo -e "WARNING [$(basename "$0")]: $*"; }
1313
info() { echo "INFO [$(basename "$0")]: $*"; }
1414

15+
# XXX this is only a temporary measure
16+
# see: https://github.com/turnkeylinux/tracker/issues/2033
17+
RUST_V=1.76.0
18+
1519
usage() {
1620
local msg="$*"
1721
cat<<EOF
@@ -112,14 +116,19 @@ done
112116
case "$(which cargo || echo 'fail')" in
113117
"$HOME/.cargo/bin/cargo")
114118
info "Rust installed via rustup detected, attempting update"
119+
# TODO see note re $RUST_V above
115120
rustup update
121+
rustup default "$RUST_V"
116122
;;
117123
/usr/bin/cargo)
118124
warn "system installed rust detected; continuing but may cause issues\n" \
119125
" - if you encountner issues, please remove rust and rerun";;
120126
fail)
121127
info "Installing rust via rustup"
122128
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
129+
# TODO see note re $RUST_V above
130+
rustup update "$RUST_V"
131+
rustup default "$RUST_V"
123132
echo "export PATH=\"\$HOME/.cargo/bin:\$PATH\"" > "$HOME"/.bashrc.d/rust
124133
chmod +x "$HOME"/.bashrc.d/rust
125134
source "$HOME/.bashrc.d/rust";;

0 commit comments

Comments
 (0)