add reminder to use `fif --fix`

This commit is contained in:
Lynne Megido 2022-05-02 18:07:14 +10:00
parent 1b0505aad1
commit c9f68d8373
Signed by: lynnesbian
GPG Key ID: F0A184B5213D9F90
2 changed files with 9 additions and 1 deletions

View File

@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## Unreleased
### Added
- Output now contains a reminder to use `fif --fix`
### Changed
- Some extensions are considered to be always valid - these are:
- "filepart", "part", "crdownload": Partially downloaded files, renaming could break download

View File

@ -197,6 +197,7 @@ impl FormatSteps for Shell {
if let Ok(working_directory) = std::env::current_dir() {
smart_write(f, writablesln!["# Run from ", (working_directory.as_path())])?;
}
write!(f, "# Happy with these changes? Run `fif --fix` from the same directory!")?;
smart_write(f, writablesln![Newline, "set -e", Newline])
}
@ -253,6 +254,7 @@ impl FormatSteps for PowerShell {
if let Ok(working_directory) = std::env::current_dir() {
smart_write(f, writablesln!["<# Run from ", (working_directory.as_path()), " #>"])?;
}
write!(f, "<# Happy with these changes? Run `fif --fix` from the same directory! #>")?;
smart_write(f, writables![Newline])
}
@ -287,7 +289,11 @@ impl FormatSteps for Text {
}
fn header<W: Write>(&self, f: &mut W) -> io::Result<()> {
smart_write(f, writablesln![(generated_by().as_str()), Newline])
smart_write(f, writablesln![(generated_by().as_str()), Newline])?;
if let Ok(working_directory) = std::env::current_dir() {
smart_write(f, writablesln!["Run from ", (working_directory.as_path())])?;
}
write!(f, "Happy with these changes? Run `fif --fix` from the same directory!")
}
fn footer<W: Write>(&self, f: &mut W) -> io::Result<()> {