Rollup merge of #119884 - GuillaumeGomez:rename-env-opt, r=davidtwco
Rename `--env` option flag to `--env-set` As discussed [on zulip](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Stabilizing.20.60--env.60.20option.20flag.3F). We rename `--env` to not conflicting names with the [RFC](https://github.com/rust-lang/rfcs/pull/2794). r? `@davidtwco`
This commit is contained in:
commit
c997b29a3a
9 changed files with 17 additions and 17 deletions
|
@ -1824,7 +1824,7 @@ pub fn rustc_optgroups() -> Vec<RustcOptGroup> {
|
|||
"Remap source names in all output (compiler messages and output files)",
|
||||
"FROM=TO",
|
||||
),
|
||||
opt::multi("", "env", "Inject an environment variable", "VAR=VALUE"),
|
||||
opt::multi("", "env-set", "Inject an environment variable", "VAR=VALUE"),
|
||||
]);
|
||||
opts
|
||||
}
|
||||
|
@ -2600,11 +2600,11 @@ fn parse_logical_env(
|
|||
) -> FxIndexMap<String, String> {
|
||||
let mut vars = FxIndexMap::default();
|
||||
|
||||
for arg in matches.opt_strs("env") {
|
||||
for arg in matches.opt_strs("env-set") {
|
||||
if let Some((name, val)) = arg.split_once('=') {
|
||||
vars.insert(name.to_string(), val.to_string());
|
||||
} else {
|
||||
early_dcx.early_fatal(format!("`--env`: specify value for variable `{arg}`"));
|
||||
early_dcx.early_fatal(format!("`--env-set`: specify value for variable `{arg}`"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue