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>(
1740
1740
. about ( crate_description ! ( ) )
1741
1741
. version ( crate_version ! ( ) )
1742
1742
. setting ( AppSettings :: SubcommandRequiredElseHelp )
1743
- . arg ( {
1744
- let arg = Arg :: with_name ( "config_file" )
1743
+ . arg (
1744
+ Arg :: with_name ( "config_file" )
1745
1745
. short ( "C" )
1746
1746
. long ( "config" )
1747
1747
. value_name ( "PATH" )
1748
1748
. takes_value ( true )
1749
1749
. 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
+ )
1757
1752
. arg (
1758
1753
Arg :: with_name ( "verbose" )
1759
1754
. short ( "v" )
@@ -2556,6 +2551,8 @@ fn main() -> Result<(), Error> {
2556
2551
eprintln ! ( "error: Could not find config file `{}`" , config_file) ;
2557
2552
exit ( 1 ) ;
2558
2553
} )
2554
+ } else if let Some ( ref config_file) = * solana_cli_config:: CONFIG_FILE {
2555
+ solana_cli_config:: Config :: load ( config_file) . unwrap_or_default ( )
2559
2556
} else {
2560
2557
solana_cli_config:: Config :: default ( )
2561
2558
} ;
You can’t perform that action at this time.
0 commit comments