@@ -23,21 +23,21 @@ use tokio::process::Command;
23
23
pub struct Opts {
24
24
/// The flake to deploy
25
25
#[ clap( group = "deploy" ) ]
26
- target : Option < String > ,
26
+ pub target : Option < String > ,
27
27
28
28
/// A list of flakes to deploy alternatively
29
29
#[ clap( long, group = "deploy" ) ]
30
- targets : Option < Vec < String > > ,
30
+ pub targets : Option < Vec < String > > ,
31
31
32
32
/// Override hostname used for the node
33
33
#[ clap( long) ]
34
- hostname : Option < String > ,
34
+ pub hostname : Option < String > ,
35
35
36
36
#[ clap( flatten) ]
37
- flags : data:: Flags ,
37
+ pub flags : data:: Flags ,
38
38
39
39
#[ clap( flatten) ]
40
- generic_settings : settings:: GenericSettings ,
40
+ pub generic_settings : settings:: GenericSettings ,
41
41
}
42
42
43
43
/// Returns if the available Nix installation supports flakes
@@ -271,9 +271,9 @@ pub enum RunError {
271
271
RunDeploy ( #[ from] RunDeployError ) ,
272
272
}
273
273
274
- pub async fn run ( args : Option < & ArgMatches > ) -> Result < ( ) , RunError > {
274
+ pub async fn run ( args : Option < Opts > ) -> Result < ( ) , RunError > {
275
275
let opts = match args {
276
- Some ( o) => < Opts as FromArgMatches > :: from_arg_matches ( o ) . unwrap_or_default ( ) ,
276
+ Some ( o) => o ,
277
277
None => Opts :: parse ( ) ,
278
278
} ;
279
279
0 commit comments