File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -21,15 +21,19 @@ use crate::model::TiledQuery;
2121async fn main ( ) -> Result < ( ) , Box < dyn error:: Error > > {
2222 let cli = Cli :: init ( ) ;
2323
24- let config_filepath = cli
25- . config_filepath
26- . unwrap_or ( "Charts/glazed/files/config.toml" . into ( ) ) ;
24+ let config;
2725
28- println ! ( "Loading config from {config_filepath:?}" ) ;
26+ if let Some ( config_filepath) = cli. config_filepath {
27+ println ! ( "Loading config from {config_filepath:?}" ) ;
2928
30- let config = GlazedConfig :: from_file ( & config_filepath) ?;
29+ config = GlazedConfig :: from_file ( & config_filepath) ?;
3130
32- println ! ( "Config loaded" ) ;
31+ println ! ( "Config loaded" ) ;
32+ } else {
33+ println ! ( "Using default config" ) ;
34+
35+ config = GlazedConfig :: default ( ) ?;
36+ }
3337
3438 match cli. command {
3539 Commands :: Serve => serve ( config) . await ,
You can’t perform that action at this time.
0 commit comments