diff src/main/kotlin/name/blackcap/passman/DeleteSubcommand.kt @ 9:72619175004e

Fix issues found in testing.
author David Barts <n5jrn@me.com>
date Sat, 01 Oct 2022 09:57:23 -0700
parents 698c4a3d758d
children ea65ab890f66
line wrap: on
line diff
--- a/src/main/kotlin/name/blackcap/passman/DeleteSubcommand.kt	Fri Sep 23 20:59:52 2022 -0700
+++ b/src/main/kotlin/name/blackcap/passman/DeleteSubcommand.kt	Sat Oct 01 09:57:23 2022 -0700
@@ -7,6 +7,10 @@
         if (args.isEmpty()) {
             die("expecting a site name", 2)
         }
+        if (args[0] == "-h" || args[0].startsWith("--h")) {
+            println("usage: passman delete name [...]")
+            exitProcess(0)
+        }
         val db = Database.open()
         var errors = 0
         for (nameIn in args) {