Skip to content

Commit 7424afe

Browse files
Update generate-copyright with a hint for the user
Co-authored-by: Jakub Beránek <berykubik@gmail.com>
1 parent 0083012 commit 7424afe

File tree

1 file changed

+4
-1
lines changed
  • src/tools/generate-copyright/src

1 file changed

+4
-1
lines changed

src/tools/generate-copyright/src/main.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@ fn main() -> Result<(), Error> {
8585
fn check_file_contents(path: &Path, new_contents: &str) -> Result<(), Error> {
8686
let orig_contents = std::fs::read_to_string(&path)?;
8787
if orig_contents != new_contents {
88-
anyhow::bail!("File {} is out of date", path.display());
88+
anyhow::bail!(
89+
"File {} is out of date. Run `x run tools/generate-copyright` to regenerate it.",
90+
path.display()
91+
);
8992
} else {
9093
println!("File {} is OK", path.display());
9194
}

0 commit comments

Comments
 (0)