File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
cli/services/configurators Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -85,12 +85,9 @@ def apply_configuration(
8585 repo_config = config_manager .get_repo_config (repo_path )
8686 if repo_config is None :
8787 warn (
88- "The repo is not initialized. Starting from 0.19.25, repos are optional\n "
89- "There are three options:\n "
90- " - Run `dstack init` to initialize the current directory as a repo\n "
91- " - Specify `--repo`\n "
92- " - Specify `--no-repo` to not use any repo and supress this warning"
93- " (this will be the default in the future versions)"
88+ "Repo is not initialized. "
89+ "Use [code]--repo <dir>[/code] or [code]--no-repo[/code] to initialize it.\n "
90+ "Starting from 0.19.25, repos will be configured via YAML and this message won't appear."
9491 )
9592 if not command_args .yes and not confirm_ask ("Continue without the repo?" ):
9693 console .print ("\n Exiting..." )
Original file line number Diff line number Diff line change @@ -38,7 +38,10 @@ def load(self):
3838 with open (self .config_filepath , "r" ) as f :
3939 config = yaml .safe_load (f )
4040 self .config = GlobalConfig .parse_obj (config )
41- except (FileNotFoundError , ValidationError ):
41+ except FileNotFoundError :
42+ self .config = GlobalConfig ()
43+ except ValidationError :
44+ logger .error (f"Error in `{ self .config_filepath } `" , exc_info = True )
4245 self .config = GlobalConfig ()
4346
4447 def get_project_config (self , name : Optional [str ] = None ) -> Optional [ProjectConfig ]:
You can’t perform that action at this time.
0 commit comments