File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -56,14 +56,7 @@ pub enum Commands {
5656 } ,
5757
5858 /// Check configuration files for errors.
59- Configcheck {
60- /// Path to the configuration file.
61- #[ arg( short, long) ]
62- config : Option < PathBuf > ,
63- /// Path to the users.toml file.
64- #[ arg( short, long) ]
65- users : Option < PathBuf > ,
66- } ,
59+ Configcheck ,
6760
6861 /// Copy data from source to destination cluster
6962 /// using logical replication.
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ use pgdog::stats;
1111use pgdog:: util:: pgdog_version;
1212use pgdog:: { healthcheck, net} ;
1313use tokio:: runtime:: Builder ;
14- use tracing:: info;
14+ use tracing:: { error , info} ;
1515
1616use std:: process:: exit;
1717
@@ -35,13 +35,13 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
3535 exit ( 0 ) ;
3636 }
3737
38- Some ( Commands :: Configcheck { config , users } ) => {
39- if let Err ( e) = pgdog :: cli :: config_check ( config, users) {
40- eprintln ! ( "Configuration error: {}" , e) ;
38+ Some ( Commands :: Configcheck ) => {
39+ if let Err ( e) = config :: load ( & args . config , & args . users ) {
40+ error ! ( "{}" , e) ;
4141 exit ( 1 ) ;
4242 }
4343
44- println ! ( "✅ Configuration valid" ) ;
44+ info ! ( "✅ config valid" ) ;
4545 exit ( 0 ) ;
4646 }
4747
You can’t perform that action at this time.
0 commit comments