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 @@ -1848,20 +1848,15 @@ fn app<'a, 'b>(
1848
1848
. about ( crate_description ! ( ) )
1849
1849
. version ( crate_version ! ( ) )
1850
1850
. setting ( AppSettings :: SubcommandRequiredElseHelp )
1851
- . arg ( {
1852
- let arg = Arg :: with_name ( "config_file" )
1851
+ . arg (
1852
+ Arg :: with_name ( "config_file" )
1853
1853
. short ( "C" )
1854
1854
. long ( "config" )
1855
1855
. value_name ( "PATH" )
1856
1856
. takes_value ( true )
1857
1857
. global ( true )
1858
- . help ( "Configuration file to use" ) ;
1859
- if let Some ( ref config_file) = * solana_cli_config:: CONFIG_FILE {
1860
- arg. default_value ( config_file)
1861
- } else {
1862
- arg
1863
- }
1864
- } )
1858
+ . help ( "Configuration file to use" ) ,
1859
+ )
1865
1860
. arg (
1866
1861
Arg :: with_name ( "verbose" )
1867
1862
. short ( "v" )
@@ -2669,6 +2664,8 @@ async fn main() -> Result<(), Error> {
2669
2664
eprintln ! ( "error: Could not find config file `{}`" , config_file) ;
2670
2665
exit ( 1 ) ;
2671
2666
} )
2667
+ } else if let Some ( ref config_file) = * solana_cli_config:: CONFIG_FILE {
2668
+ solana_cli_config:: Config :: load ( config_file) . unwrap_or_default ( )
2672
2669
} else {
2673
2670
solana_cli_config:: Config :: default ( )
2674
2671
} ;
You can’t perform that action at this time.
0 commit comments