mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-13 07:32:20 +00:00
cat: slightly change warning message about non-file paths
I'm going to add a similar message for access denied. That will want an error message printed at the end. For consistency, let's do the same for non-file paths.
This commit is contained in:
parent
e0e123873b
commit
fccba76e8b
2 changed files with 2 additions and 2 deletions
|
@ -114,7 +114,7 @@ fn write_tree_entries<P: AsRef<RepoPath>>(
|
||||||
let ui_path = workspace_command.format_file_path(path.as_ref());
|
let ui_path = workspace_command.format_file_path(path.as_ref());
|
||||||
writeln!(
|
writeln!(
|
||||||
ui.warning_default(),
|
ui.warning_default(),
|
||||||
"Path exists but is not a file: {ui_path}"
|
"Path '{ui_path}' exists but is not a file"
|
||||||
)?;
|
)?;
|
||||||
}
|
}
|
||||||
MaterializedTreeValue::Tree(_) => panic!("entries should not contain trees"),
|
MaterializedTreeValue::Tree(_) => panic!("entries should not contain trees"),
|
||||||
|
|
|
@ -118,6 +118,6 @@ fn test_cat_symlink() {
|
||||||
a
|
a
|
||||||
"###);
|
"###);
|
||||||
insta::assert_snapshot!(stderr, @r###"
|
insta::assert_snapshot!(stderr, @r###"
|
||||||
Warning: Path exists but is not a file: symlink1
|
Warning: Path 'symlink1' exists but is not a file
|
||||||
"###);
|
"###);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue