File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ use log::error;
88
99#[ tokio:: main]
1010async fn main ( ) -> Result < ( ) , Box < dyn std:: error:: Error > > {
11- match cli:: run ( ) . await {
11+ match cli:: run ( None ) . await {
1212 Ok ( ( ) ) => ( ) ,
1313 Err ( err) => {
1414 error ! ( "{}" , err) ;
Original file line number Diff line number Diff line change 66use std:: collections:: HashMap ;
77use std:: io:: { stdin, stdout, Write } ;
88
9- use clap:: Clap ;
9+ use clap:: { Clap , ArgMatches , FromArgMatches } ;
1010
1111use crate as deploy;
1212
@@ -607,8 +607,11 @@ pub enum RunError {
607607 RunDeploy ( #[ from] RunDeployError ) ,
608608}
609609
610- pub async fn run ( ) -> Result < ( ) , RunError > {
611- let opts: Opts = Opts :: parse ( ) ;
610+ pub async fn run ( args : Option < & ArgMatches > ) -> Result < ( ) , RunError > {
611+ let opts = match args {
612+ Some ( o) => <Opts as FromArgMatches >:: from_arg_matches ( o) ,
613+ None => Opts :: parse ( ) ,
614+ } ;
612615
613616 deploy:: init_logger (
614617 opts. debug_logs ,
You can’t perform that action at this time.
0 commit comments