diff --git a/Cargo.lock b/Cargo.lock index 12f1c26b11..36287f9507 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2104,6 +2104,7 @@ dependencies = [ "tikv-jemallocator", "ureq", "walkdir", + "wild", ] [[package]] @@ -3272,6 +3273,15 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17882f045410753661207383517a6f62ec3dbeb6a4ed2acce01f0728238d1983" +[[package]] +name = "wild" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05b116685a6be0c52f5a103334cbff26db643826c7b3735fc0a3ba9871310a74" +dependencies = [ + "glob", +] + [[package]] name = "winapi" version = "0.3.9" diff --git a/crates/ruff_cli/Cargo.toml b/crates/ruff_cli/Cargo.toml index 9de99eb268..2cfbbde827 100644 --- a/crates/ruff_cli/Cargo.toml +++ b/crates/ruff_cli/Cargo.toml @@ -56,6 +56,7 @@ similar = { workspace = true } strum = { workspace = true, features = [] } textwrap = { workspace = true } walkdir = { version = "2.3.2" } +wild = { version = "2" } [dev-dependencies] assert_cmd = { version = "2.0.8" } diff --git a/crates/ruff_cli/src/bin/ruff.rs b/crates/ruff_cli/src/bin/ruff.rs index bd2f535fa4..3a00d1d93d 100644 --- a/crates/ruff_cli/src/bin/ruff.rs +++ b/crates/ruff_cli/src/bin/ruff.rs @@ -23,7 +23,7 @@ static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc; static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc; pub fn main() -> ExitCode { - let mut args: Vec<_> = std::env::args().collect(); + let mut args: Vec<_> = wild::args().collect(); // Clap doesn't support default subcommands but we want to run `check` by // default for convenience and backwards-compatibility, so we just