forked from extern/nushell
Improve the "input and output are the same file" error text (#12619)
# Description Continuing from #12601, this PR improves the error message help text and adds an example to `collect`.
This commit is contained in:
@ -260,7 +260,7 @@ fn saving_to_source_file_error(dest: &Spanned<PathBuf>) -> ShellError {
|
||||
dest.item.display()
|
||||
),
|
||||
span: Some(dest.span),
|
||||
help: Some("you should change the output path".into()),
|
||||
help: Some("You should use `collect` to run your save command (see `help collect`). Or, you can put the file data in a variable and then pass the variable to `save`.".into()),
|
||||
inner: vec![],
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user