Configurable rust install script tipi containers#94
Conversation
install/container/tipi-rust.sh
Outdated
| mkdir -p ${RUSTUP_HOME} | ||
|
|
||
| echo -e "Installing rust ${RUSTUP_TOOLCHAIN} using rustup from https://sh.rustup.rs" | ||
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --no-modify-path --default-toolchain ${RUSTUP_TOOLCHAIN} -y |
There was a problem hiding this comment.
This will fail silently in case the downloaded script fails. Also against our ISMS policy.
daminetreg
left a comment
There was a problem hiding this comment.
Generally looking nice, I want to see it's use in our real dockers first too, and how is Windows handled ? This likely works for macos ?
Possibly enabling set -e is welcome.
|
By the way we have changes in #92 that likely are a better base for this work than master itself. Because if you test on that state you will end up with 0.0.62 |
|
|
||
| echo -e "Installing rust ${RUSTUP_TOOLCHAIN} using rustup from https://sh.rustup.rs" | ||
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --no-modify-path --default-toolchain ${RUSTUP_TOOLCHAIN} -y | ||
| (curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs || echo "echo 'Failed to download rustup - aborting; exit 1") | sh -s -- --no-modify-path --default-toolchain ${RUSTUP_TOOLCHAIN} ${cli_arg_yes} |
There was a problem hiding this comment.
If the file doesn't contain proper content, like empty, I think you will still end up with no error as piping to sh will just accept anything. I would download to tmp and run that.
There was a problem hiding this comment.
I even believe to have seen invalid syntax errors not end up with exit 1 when used with pipe. But it feels so weird that I feel it needs a recheck.
Scripts installs a rust toolchain as specified using the following environment variables:
RUSTUP_TOOLCHAINRUSTUP_HOMECARGO_HOMEAdditionall the script supports setting the access rights in the installation location in a way that all users in the
--group <NAME>have the same rights as the installing user to enable sharing the installation between mutliple group members.Usage: