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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user