From 5ee0356e346bf1753ac6ac8bd1dedd5252435a88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Saparelli?= Date: Thu, 16 Jun 2022 10:19:09 +0000 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20allow=20invalid=20UTF-8=20argum?= =?UTF-8?q?ents=20(#317)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/cli/src/config/runtime.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/cli/src/config/runtime.rs b/crates/cli/src/config/runtime.rs index ee835fb..3ea8934 100644 --- a/crates/cli/src/config/runtime.rs +++ b/crates/cli/src/config/runtime.rs @@ -22,9 +22,8 @@ pub fn runtime(args: &ArgMatches) -> Result { let mut config = RuntimeConfig::default(); config.command( - args.values_of_lossy("command") + args.values_of("command") .expect("(clap) Bug: command is not present") - .iter(), ); config.pathset(match args.values_of_os("paths") { @@ -201,7 +200,7 @@ pub fn runtime(args: &ArgMatches) -> Result { }); let mut add_envs = HashMap::new(); - for pair in args.values_of_lossy("command-env").unwrap_or_default() { + for pair in args.values_of("command-env").unwrap_or_default() { if let Some((k, v)) = pair.split_once('=') { add_envs.insert(k.to_owned(), OsString::from(v)); } else {