diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d0a7466..a4f9c93d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,11 @@ All versions prior to 0.2.1 are untracked. ## [Unreleased] - ReleaseDate +### Fixed + +* A regression in subcommand handling was fixed +([#514](https://github.com/woodruffw/kbs2/pull/514)) + ## [0.7.0] - 2023-02-24 ### Added diff --git a/src/main.rs b/src/main.rs index c8c26e4c..c4360a87 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,4 @@ -use std::ffi::OsStr; +use std::ffi::{OsStr, OsString}; use std::process; use std::{io, path::PathBuf}; @@ -326,8 +326,8 @@ fn run(matches: &ArgMatches, config: &kbs2::config::Config) -> Result<()> { Some((cmd, matches)) => { let cmd = format!("kbs2-{cmd}"); - let ext_args: Vec<&str> = match matches.get_many::("") { - Some(values) => values.map(AsRef::as_ref).collect(), + let ext_args: Vec<_> = match matches.get_many::("") { + Some(values) => values.collect(), None => vec![], };