File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed
relay/sources/rudder-package/src Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,10 @@ pub struct Args {
45
45
#[ derive( Debug , Subcommand ) ]
46
46
pub enum Command {
47
47
/// Update package index and licenses from the repository
48
- Update { } ,
48
+ Update {
49
+ #[ clap( long, short, help = "Only check for server connectivity" ) ]
50
+ check : bool ,
51
+ } ,
49
52
/// Install plugins, locally or from the repository
50
53
Install {
51
54
#[ clap( long, short, help = "Force installation of given plugin" ) ]
@@ -119,6 +122,4 @@ pub enum Command {
119
122
) ]
120
123
incompatible : bool ,
121
124
} ,
122
- /// Test connection to the plugin repository
123
- CheckConnection { } ,
124
125
}
Original file line number Diff line number Diff line change @@ -202,9 +202,13 @@ pub fn run() -> Result<()> {
202
202
)
203
203
}
204
204
}
205
- Command :: Update { } => {
206
- repo. update ( & webapp) ?;
207
- info ! ( "Index and licenses successfully updated" )
205
+ Command :: Update { check } => {
206
+ if check {
207
+ repo. test_connection ( ) ?;
208
+ } else {
209
+ repo. update ( & webapp) ?;
210
+ info ! ( "Index and licenses successfully updated" )
211
+ }
208
212
}
209
213
Command :: Enable {
210
214
package,
@@ -292,7 +296,6 @@ pub fn run() -> Result<()> {
292
296
info ! ( "Plugins successfully disabled" ) ;
293
297
}
294
298
}
295
- Command :: CheckConnection { } => repo. test_connection ( ) ?,
296
299
}
297
300
// Restart if needed
298
301
webapp. apply_changes ( ) ?;
You can’t perform that action at this time.
0 commit comments