Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use backticks in project init message #5302

Merged
merged 1 commit into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/uv/src/commands/project/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ pub(crate) async fn init(
match explicit_path {
// Initialized a project in the current directory.
None => {
writeln!(printer.stderr(), "Initialized project {}", name.cyan())?;
writeln!(printer.stderr(), "Initialized project `{}`", name.cyan())?;
}

// Initialized a project in the given directory.
Expand All @@ -147,7 +147,7 @@ pub(crate) async fn init(

writeln!(
printer.stderr(),
"Initialized project {} in {}",
"Initialized project `{}` at `{}`",
name.cyan(),
path.display().cyan()
)?;
Expand Down
14 changes: 7 additions & 7 deletions crates/uv/tests/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ fn init() -> Result<()> {

----- stderr -----
warning: `uv init` is experimental and may change without warning
Initialized project foo in [TEMP_DIR]/foo
Initialized project `foo` at `[TEMP_DIR]/foo`
"###);

let pyproject = fs_err::read_to_string(context.temp_dir.join("foo/pyproject.toml"))?;
Expand Down Expand Up @@ -83,7 +83,7 @@ fn init_no_readme() -> Result<()> {

----- stderr -----
warning: `uv init` is experimental and may change without warning
Initialized project foo in [TEMP_DIR]/foo
Initialized project `foo` at `[TEMP_DIR]/foo`
"###);

let pyproject = fs_err::read_to_string(context.temp_dir.join("foo/pyproject.toml"))?;
Expand Down Expand Up @@ -123,7 +123,7 @@ fn current_dir() -> Result<()> {

----- stderr -----
warning: `uv init` is experimental and may change without warning
Initialized project foo
Initialized project `foo`
"###);

let pyproject = fs_err::read_to_string(dir.join("pyproject.toml"))?;
Expand Down Expand Up @@ -201,7 +201,7 @@ fn init_workspace() -> Result<()> {
----- stderr -----
warning: `uv init` is experimental and may change without warning
Adding foo as member of workspace [TEMP_DIR]/
Initialized project foo
Initialized project `foo`
"###);

let pyproject = fs_err::read_to_string(child.join("pyproject.toml"))?;
Expand Down Expand Up @@ -296,7 +296,7 @@ fn init_workspace_relative_sub_package() -> Result<()> {
----- stderr -----
warning: `uv init` is experimental and may change without warning
Adding foo as member of workspace [TEMP_DIR]/
Initialized project foo in [TEMP_DIR]/foo
Initialized project `foo` at `[TEMP_DIR]/foo`
"###);

let pyproject = fs_err::read_to_string(child.join("pyproject.toml"))?;
Expand Down Expand Up @@ -392,7 +392,7 @@ fn init_workspace_outside() -> Result<()> {
----- stderr -----
warning: `uv init` is experimental and may change without warning
Adding foo as member of workspace [TEMP_DIR]/
Initialized project foo in [TEMP_DIR]/foo
Initialized project `foo` at `[TEMP_DIR]/foo`
"###);

let pyproject = fs_err::read_to_string(child.join("pyproject.toml"))?;
Expand Down Expand Up @@ -473,7 +473,7 @@ fn init_invalid_names() -> Result<()> {

----- stderr -----
warning: `uv init` is experimental and may change without warning
Initialized project foo-bar in [TEMP_DIR]/foo-bar
Initialized project `foo-bar` at `[TEMP_DIR]/foo-bar`
"###);

let child = context.temp_dir.child("foo-bar");
Expand Down
Loading