mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
fix: Prepare error message for --allow-staged
Signed-off-by: Jordan Justen <jljusten@gmail.com>
This commit is contained in:
parent
0ec7281b9c
commit
4539ff2191
@ -113,10 +113,10 @@ fn check_version_control(opts: &FixOptions) -> CargoResult<()> {
|
||||
for file in dirty_files {
|
||||
files_list.push_str(" * ");
|
||||
files_list.push_str(&file);
|
||||
files_list.push_str("\n");
|
||||
files_list.push_str(" (dirty)\n");
|
||||
}
|
||||
|
||||
bail!("the working directory of this project is detected as dirty, and \
|
||||
bail!("the working directory of this project has uncommitted changes, and \
|
||||
`cargo fix` can potentially perform destructive changes; if you'd \
|
||||
like to suppress this error pass `--allow-dirty`, or commit the \
|
||||
changes to these files:\n\
|
||||
|
@ -785,12 +785,12 @@ fn warns_about_dirty_working_directory() {
|
||||
execs()
|
||||
.with_status(101)
|
||||
.with_stderr("\
|
||||
error: the working directory of this project is detected as dirty, and `cargo \
|
||||
fix` can potentially perform destructive changes; if you'd like to \
|
||||
suppress this error pass `--allow-dirty`, or commit the changes to \
|
||||
these files:
|
||||
error: the working directory of this project has uncommitted changes, \
|
||||
and `cargo fix` can potentially perform destructive changes; if you'd \
|
||||
like to suppress this error pass `--allow-dirty`, or commit the changes \
|
||||
to these files:
|
||||
|
||||
* src/lib.rs
|
||||
* src/lib.rs (dirty)
|
||||
|
||||
|
||||
")
|
||||
|
Loading…
x
Reference in New Issue
Block a user