mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +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 {
|
for file in dirty_files {
|
||||||
files_list.push_str(" * ");
|
files_list.push_str(" * ");
|
||||||
files_list.push_str(&file);
|
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 \
|
`cargo fix` can potentially perform destructive changes; if you'd \
|
||||||
like to suppress this error pass `--allow-dirty`, or commit the \
|
like to suppress this error pass `--allow-dirty`, or commit the \
|
||||||
changes to these files:\n\
|
changes to these files:\n\
|
||||||
|
@ -785,12 +785,12 @@ fn warns_about_dirty_working_directory() {
|
|||||||
execs()
|
execs()
|
||||||
.with_status(101)
|
.with_status(101)
|
||||||
.with_stderr("\
|
.with_stderr("\
|
||||||
error: the working directory of this project is detected as dirty, and `cargo \
|
error: the working directory of this project has uncommitted changes, \
|
||||||
fix` can potentially perform destructive changes; if you'd like to \
|
and `cargo fix` can potentially perform destructive changes; if you'd \
|
||||||
suppress this error pass `--allow-dirty`, or commit the changes to \
|
like to suppress this error pass `--allow-dirty`, or commit the changes \
|
||||||
these files:
|
to these files:
|
||||||
|
|
||||||
* src/lib.rs
|
* src/lib.rs (dirty)
|
||||||
|
|
||||||
|
|
||||||
")
|
")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user