We should output to stderr on EXIT_FAILURE (#2558)

Making sure we use stderr to output the help
message when there is an invalid number of
arguments, or when there's any error related
to the arguments.
This commit is contained in:
louib authored and Jonathan White committed 2019-01-16 12:32:06 -05:00
1 parent d09ca076dc
commit 726bbb2d94
12 files changed
+80 -82

No files matched your search

+1 -1
View File
@@ -83,7 +83,7 @@ int Add::execute(const QStringList& arguments)
const QStringList args = parser.positionalArguments();
if (args.size() != 2) {
outputTextStream << parser.helpText().replace("keepassxc-cli", "keepassxc-cli add");
errorTextStream << parser.helpText().replace("keepassxc-cli", "keepassxc-cli add");
return EXIT_FAILURE;
}