diff --git a/src/dstack/_internal/cli/services/configurators/run.py b/src/dstack/_internal/cli/services/configurators/run.py
index 6133999ef6..7711ffe0ef 100644
--- a/src/dstack/_internal/cli/services/configurators/run.py
+++ b/src/dstack/_internal/cli/services/configurators/run.py
@@ -85,12 +85,9 @@ def apply_configuration(
repo_config = config_manager.get_repo_config(repo_path)
if repo_config is None:
warn(
- "The repo is not initialized. Starting from 0.19.25, repos are optional\n"
- "There are three options:\n"
- " - Run `dstack init` to initialize the current directory as a repo\n"
- " - Specify `--repo`\n"
- " - Specify `--no-repo` to not use any repo and supress this warning"
- " (this will be the default in the future versions)"
+ "Repo is not initialized. "
+ "Use [code]--repo
[/code] or [code]--no-repo[/code] to initialize it.\n"
+ "Starting from 0.19.25, repos will be configured via YAML and this message won't appear."
)
if not command_args.yes and not confirm_ask("Continue without the repo?"):
console.print("\nExiting...")
diff --git a/src/dstack/_internal/core/services/configs/__init__.py b/src/dstack/_internal/core/services/configs/__init__.py
index b38ab35710..a4a063cd47 100644
--- a/src/dstack/_internal/core/services/configs/__init__.py
+++ b/src/dstack/_internal/core/services/configs/__init__.py
@@ -38,7 +38,10 @@ def load(self):
with open(self.config_filepath, "r") as f:
config = yaml.safe_load(f)
self.config = GlobalConfig.parse_obj(config)
- except (FileNotFoundError, ValidationError):
+ except FileNotFoundError:
+ self.config = GlobalConfig()
+ except ValidationError:
+ logger.error(f"Error in `{self.config_filepath}`", exc_info=True)
self.config = GlobalConfig()
def get_project_config(self, name: Optional[str] = None) -> Optional[ProjectConfig]: