11use anyhow:: Result ;
22use clap:: { Parser , Subcommand } ;
3- use repos:: { commands:: * , config:: Config } ;
3+ use repos:: { commands:: * , config:: Config , constants } ;
44use std:: env;
55
66#[ derive( Parser ) ]
@@ -20,7 +20,7 @@ enum Commands {
2020 repos : Vec < String > ,
2121
2222 /// Configuration file path
23- #[ arg( short, long, default_value = " config.yaml" ) ]
23+ #[ arg( short, long, default_value_t = constants :: config:: DEFAULT_CONFIG_FILE . to_string ( ) ) ]
2424 config : String ,
2525
2626 /// Filter repositories by tag
@@ -41,11 +41,11 @@ enum Commands {
4141 repos : Vec < String > ,
4242
4343 /// Directory to store log files
44- #[ arg( short, long, default_value = "logs" ) ]
44+ #[ arg( short, long, default_value_t = constants :: config :: DEFAULT_LOGS_DIR . to_string ( ) ) ]
4545 logs : String ,
4646
4747 /// Configuration file path
48- #[ arg( short, long, default_value = " config.yaml" ) ]
48+ #[ arg( short, long, default_value_t = constants :: config:: DEFAULT_CONFIG_FILE . to_string ( ) ) ]
4949 config : String ,
5050
5151 /// Filter repositories by tag
@@ -95,7 +95,7 @@ enum Commands {
9595 create_only : bool ,
9696
9797 /// Configuration file path
98- #[ arg( short, long, default_value = " config.yaml" ) ]
98+ #[ arg( short, long, default_value_t = constants :: config:: DEFAULT_CONFIG_FILE . to_string ( ) ) ]
9999 config : String ,
100100
101101 /// Filter repositories by tag
@@ -113,7 +113,7 @@ enum Commands {
113113 repos : Vec < String > ,
114114
115115 /// Configuration file path
116- #[ arg( short, long, default_value = " config.yaml" ) ]
116+ #[ arg( short, long, default_value_t = constants :: config:: DEFAULT_CONFIG_FILE . to_string ( ) ) ]
117117 config : String ,
118118
119119 /// Filter repositories by tag
@@ -128,7 +128,7 @@ enum Commands {
128128 /// Create a config.yaml file from discovered Git repositories
129129 Init {
130130 /// Output file name
131- #[ arg( short, long, default_value = " config.yaml" ) ]
131+ #[ arg( short, long, default_value_t = constants :: config:: DEFAULT_CONFIG_FILE . to_string ( ) ) ]
132132 output : String ,
133133
134134 /// Overwrite existing file if it exists
0 commit comments