[Solved] Is there a way to install rust toolchain silently?

#1

I’m trying to integrate rust installation into a singularity (a docker-like container) configure file. During the initialization of a singularity image, I cannot interactive with the program, so is there a command to install rust toolchain silently, i.e., without interaction.

I can pass parameter to rustup as --default-toolchain nightly --default-host x86_64-unknown-linux-gnu, however, it still asked me to confirm the configuration, I need to press the Enter.

Thanks.

0 Likes

#2
$ ./rustup-init.sh --help
rustup-init 1.0.0 (408ed84 2017-02-11)
The installer for rustup

USAGE:
    rustup-init [FLAGS] [OPTIONS]

FLAGS:
    -v, --verbose           Enable verbose output
    -y                      Disable confirmation prompt.
        --no-modify-path    Don't configure the PATH environment variable
    -h, --help              Prints help information
    -V, --version           Prints version information

OPTIONS:
        --default-host <default-host>              Choose a default host triple
        --default-toolchain <default-toolchain>    Choose a default toolchain to install
        --default-toolchain none                   Do not install any toolchains

Looks like you can pass -y?

2 Likes

#3

I believe -q is “quiet”, but I’m on my phone so I can’t check.

0 Likes

#4

Thanks, -y works

0 Likes