mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-01-03 09:35:53 -05:00
Adding --no-password option to CLI
I also added tests for the --key-file option, which was untested.
This commit is contained in:
parent
a58e3d5ee0
commit
13a9ac8f57
20 changed files with 146 additions and 20 deletions
|
|
@ -50,6 +50,7 @@ int Locate::execute(const QStringList& arguments)
|
|||
parser.addPositionalArgument("term", QObject::tr("Search term."));
|
||||
parser.addOption(Command::QuietOption);
|
||||
parser.addOption(Command::KeyFileOption);
|
||||
parser.addOption(Command::NoPasswordOption);
|
||||
parser.addHelpOption();
|
||||
parser.process(arguments);
|
||||
|
||||
|
|
@ -60,6 +61,7 @@ int Locate::execute(const QStringList& arguments)
|
|||
}
|
||||
|
||||
auto db = Utils::unlockDatabase(args.at(0),
|
||||
!parser.isSet(Command::NoPasswordOption),
|
||||
parser.value(Command::KeyFileOption),
|
||||
parser.isSet(Command::QuietOption) ? Utils::DEVNULL : Utils::STDOUT,
|
||||
Utils::STDERR);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue