From ceb8f74901f3160cc6ab0de6b8a1eb0f1984e060 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 8 Jan 2020 11:27:31 +0100 Subject: :arrow_up: pico-args --- xtask/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xtask') diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 053453e6e..c347de9ab 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -22,8 +22,8 @@ fn main() -> Result<()> { return pre_commit::run_hook(); } - let subcommand = std::env::args().nth(1).unwrap_or_default(); - let mut args = Arguments::from_vec(std::env::args_os().skip(2).collect()); + let mut args = Arguments::from_env(); + let subcommand = args.subcommand()?.unwrap_or_default(); match subcommand.as_str() { "install" => { -- cgit v1.2.3