Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update master from dev #20

Merged
merged 11 commits into from
Apr 7, 2021
Prev Previous commit
Next Next commit
Better error message for MissingArgumentsForDecompression
  • Loading branch information
vrmiguel committed Apr 6, 2021
commit 784217143a475de3d12b8caa47d381994b2627b3
5 changes: 4 additions & 1 deletion src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ impl fmt::Display for Error {
}
Error::MissingArgumentsForCompression => {
write!(f, "{} ", "[ERROR]".red())?;
write!(f,"The compress subcommands demands at least 2 arguments, see usage: <TODO-USAGE>")
let spacing = " ";
writeln!(f,"The compress subcommands demands at least 2 arguments, an input file and an output file.")?;
writeln!(f,"{}Example: `ouch compress img.jpeg img.zip", spacing)?;
write!(f,"{}For more information, run `ouch --help`", spacing)
}
Error::InternalError => {
write!(f, "{} ", "[ERROR]".red())?;
Expand Down