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

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.


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

    rustup-init [FLAGS] [OPTIONS]

    -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

        --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?


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

Thanks, -y works