Adding --no-password option to CLI

I also added tests for the --key-file option, which was
untested.
This commit is contained in:
Jonathan White committed 2019-03-24 09:23:26 -04:00
1 parent a58e3d5ee0
commit 13a9ac8f57
20 files changed
+146 -20

No files matched your search

+2
View File
@@ -51,6 +51,7 @@ int Remove::execute(const QStringList& arguments)
parser.addPositionalArgument("database", QObject::tr("Path of the database."));
parser.addOption(Command::QuietOption);
parser.addOption(Command::KeyFileOption);
parser.addOption(Command::NoPasswordOption);
parser.addPositionalArgument("entry", QObject::tr("Path of the entry to remove."));
parser.addHelpOption();
parser.process(arguments);
@@ -62,6 +63,7 @@ int Remove::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);