Handling entry not found.

This commit is contained in:
Louis-Bertrand Varin authored and Louis-Bertrand Varin committed 2017-03-16 10:09:50 -04:00
1 parent 15c2727a1d
commit db1bf88934
1 file changed
+5
+5
View File
@@ -78,6 +78,11 @@ int Show::execute(int argc, char **argv)
Uuid uuid = Uuid::fromHex(args.at(1));
Entry* entry = db->resolveEntry(uuid);
if (entry == nullptr) {
qCritical("No entry found with uuid %s", qPrintable(uuid.toHex()));
return EXIT_FAILURE;
}
out << entry->password() << "\n";
return EXIT_SUCCESS;
}