This repository was archived by the owner on Mar 11, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -1740,20 +1740,15 @@ fn app<'a, 'b>(
17401740 . about ( crate_description ! ( ) )
17411741 . version ( crate_version ! ( ) )
17421742 . setting ( AppSettings :: SubcommandRequiredElseHelp )
1743- . arg ( {
1744- let arg = Arg :: with_name ( "config_file" )
1743+ . arg (
1744+ Arg :: with_name ( "config_file" )
17451745 . short ( "C" )
17461746 . long ( "config" )
17471747 . value_name ( "PATH" )
17481748 . takes_value ( true )
17491749 . global ( true )
1750- . help ( "Configuration file to use" ) ;
1751- if let Some ( ref config_file) = * solana_cli_config:: CONFIG_FILE {
1752- arg. default_value ( config_file)
1753- } else {
1754- arg
1755- }
1756- } )
1750+ . help ( "Configuration file to use" ) ,
1751+ )
17571752 . arg (
17581753 Arg :: with_name ( "verbose" )
17591754 . short ( "v" )
@@ -2556,6 +2551,8 @@ fn main() -> Result<(), Error> {
25562551 eprintln ! ( "error: Could not find config file `{}`" , config_file) ;
25572552 exit ( 1 ) ;
25582553 } )
2554+ } else if let Some ( ref config_file) = * solana_cli_config:: CONFIG_FILE {
2555+ solana_cli_config:: Config :: load ( config_file) . unwrap_or_default ( )
25592556 } else {
25602557 solana_cli_config:: Config :: default ( )
25612558 } ;
You can’t perform that action at this time.
0 commit comments