Skip to content

Commit 8244acc

Browse files
committed
fix(rustup-init): fix typo in rustup-init[.sh] args
1 parent 66b7a44 commit 8244acc

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

rustup-init.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ Options:
5050
Choose a default toolchain to install. Use 'none' to not install any toolchains at all
5151
--profile <PROFILE>
5252
[default: default] [possible values: minimal, default, complete]
53-
-c, --components <COMPONENTS>...
53+
-c, --component <COMPONENT>...
5454
Component name to also install
55-
-t, --targets <TARGETS>...
55+
-t, --target <TARGET>...
5656
Target name to also install
5757
--no-update-default-toolchain
5858
Don't update any existing default toolchain after install

src/cli/setup_mode.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ struct RustupInit {
5151

5252
/// Component name to also install
5353
#[arg(short, long, value_delimiter = ',', num_args = 1..)]
54-
components: Vec<String>,
54+
component: Vec<String>,
5555

5656
/// Target name to also install
5757
#[arg(short, long, value_delimiter = ',', num_args = 1..)]
58-
targets: Vec<String>,
58+
target: Vec<String>,
5959

6060
/// Don't update any existing default toolchain after install
6161
#[arg(long)]
@@ -85,8 +85,8 @@ pub fn main() -> Result<utils::ExitCode> {
8585
default_host,
8686
default_toolchain,
8787
profile,
88-
components,
89-
targets,
88+
component,
89+
target,
9090
no_update_default_toolchain,
9191
no_modify_path,
9292
self_replace,
@@ -119,8 +119,8 @@ pub fn main() -> Result<utils::ExitCode> {
119119
profile,
120120
no_modify_path,
121121
no_update_toolchain: no_update_default_toolchain,
122-
components: &components.iter().map(|s| &**s).collect::<Vec<_>>(),
123-
targets: &targets.iter().map(|s| &**s).collect::<Vec<_>>(),
122+
components: &component.iter().map(|s| &**s).collect::<Vec<_>>(),
123+
targets: &target.iter().map(|s| &**s).collect::<Vec<_>>(),
124124
};
125125

126126
self_update::install(no_prompt, verbose, quiet, opts)

tests/suite/cli-ui/rustup-init/rustup-init_help_flag_stdout.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ Options:
2121
Choose a default toolchain to install. Use 'none' to not install any toolchains at all
2222
--profile <PROFILE>
2323
[default: default] [possible values: minimal, default, complete]
24-
-c, --components <COMPONENTS>...
24+
-c, --component <COMPONENT>...
2525
Component name to also install
26-
-t, --targets <TARGETS>...
26+
-t, --target <TARGET>...
2727
Target name to also install
2828
--no-update-default-toolchain
2929
Don't update any existing default toolchain after install

tests/suite/cli-ui/rustup-init/rustup-init_sh_help_flag_stdout.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ Options:
2121
Choose a default toolchain to install. Use 'none' to not install any toolchains at all
2222
--profile <PROFILE>
2323
[default: default] [possible values: minimal, default, complete]
24-
-c, --components <COMPONENTS>...
24+
-c, --component <COMPONENT>...
2525
Component name to also install
26-
-t, --targets <TARGETS>...
26+
-t, --target <TARGET>...
2727
Target name to also install
2828
--no-update-default-toolchain
2929
Don't update any existing default toolchain after install

0 commit comments

Comments
 (0)