diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-03-08 17:49:15 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-08 22:49:15 +0000 |
commit | 119744c2856526479907039ced66adb8d25cb69d (patch) | |
tree | 6a862912a39c758624774f8b89e70daa12a49fbf | |
parent | 071b3da0209018d100a7ea1ce730f520d9bbd241 (diff) |
fix(publish): suggest using `--allow-dirty` on uncommitted changes (#22810)
-rw-r--r-- | cli/tools/registry/mod.rs | 2 | ||||
-rw-r--r-- | tests/integration/publish_tests.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/cli/tools/registry/mod.rs b/cli/tools/registry/mod.rs index f8c79d85c..f3321e44a 100644 --- a/cli/tools/registry/mod.rs +++ b/cli/tools/registry/mod.rs @@ -952,7 +952,7 @@ pub async fn publish( && !publish_flags.allow_dirty && check_if_git_repo_dirty(cli_options.initial_cwd()).await { - bail!("Aborting due to uncomitted changes",); + bail!("Aborting due to uncommitted changes. Check in source code or run with --allow-dirty"); } perform_publish( diff --git a/tests/integration/publish_tests.rs b/tests/integration/publish_tests.rs index 49c531e7d..a590e02ad 100644 --- a/tests/integration/publish_tests.rs +++ b/tests/integration/publish_tests.rs @@ -630,7 +630,7 @@ fn allow_dirty() { .run(); output.assert_exit_code(1); let output = output.combined_output(); - assert_contains!(output, "Aborting due to uncomitted changes"); + assert_contains!(output, "Aborting due to uncommitted changes. Check in source code or run with --allow-dirty"); let output = context .new_command() |