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;
8
8
9
9
#[ tokio:: main]
10
10
async fn main ( ) -> Result < ( ) , Box < dyn std:: error:: Error > > {
11
- match cli:: run ( ) . await {
11
+ match cli:: run ( None ) . await {
12
12
Ok ( ( ) ) => ( ) ,
13
13
Err ( err) => {
14
14
error ! ( "{}" , err) ;
Original file line number Diff line number Diff line change 6
6
use std:: collections:: HashMap ;
7
7
use std:: io:: { stdin, stdout, Write } ;
8
8
9
- use clap:: Clap ;
9
+ use clap:: { Clap , ArgMatches , FromArgMatches } ;
10
10
11
11
use crate as deploy;
12
12
@@ -607,8 +607,11 @@ pub enum RunError {
607
607
RunDeploy ( #[ from] RunDeployError ) ,
608
608
}
609
609
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
+ } ;
612
615
613
616
deploy:: init_logger (
614
617
opts. debug_logs ,
You can’t perform that action at this time.
0 commit comments