mirror of https://github.com/astral-sh/uv
Improve error message for uv init already init-ed (#7198)
Someone in https://discord.com/channels/1039017663004942429/1207998321562619954/1282411049106145400 found this confusing Could maybe improve further, e.g. what the user should do next might depend if there are [project] or [tool.uv] sections --------- Co-authored-by: Charlie Marsh <crmarsh416@gmail.com>
This commit is contained in:
parent
bf33a7cf13
commit
022e41327a
|
|
@ -50,7 +50,7 @@ pub(crate) async fn init(
|
|||
if path.join("pyproject.toml").exists() {
|
||||
let path = std::path::absolute(&path).unwrap_or_else(|_| path.simplified().to_path_buf());
|
||||
anyhow::bail!(
|
||||
"Project is already initialized in `{}`",
|
||||
"Project is already initialized in `{}` (`pyproject.toml` file exists)",
|
||||
path.display().cyan()
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1025,7 +1025,7 @@ fn init_normalized_names() -> Result<()> {
|
|||
----- stdout -----
|
||||
|
||||
----- stderr -----
|
||||
error: Project is already initialized in `[TEMP_DIR]/foo-bar`
|
||||
error: Project is already initialized in `[TEMP_DIR]/foo-bar` (`pyproject.toml` file exists)
|
||||
"###);
|
||||
|
||||
let child = context.temp_dir.child("foo-bar");
|
||||
|
|
|
|||
Loading…
Reference in New Issue