mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-11-24 02:51:38 -08:00
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:
1 parent
d09ca076dc
commit
726bbb2d94
12 files changed
+80
-82
No files matched your search
+1
-1
@@ -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