]> Sergey Matveev's repositories - passman.git/blobdiff - passman
Exit immediately if no password exists
[passman.git] / passman
diff --git a/passman b/passman
index 31537932ea98fd9c95e6c4a1a25a1ddd674501ef..91d4b5456ed860ac4400b0d94afb4c34cc47acb2 100755 (executable)
--- a/passman
+++ b/passman
@@ -1,6 +1,6 @@
 #!/bin/sh -e
 # passman -- simple password manager
-# Copyright (C) 2013-2015 Sergey Matveev (stargrave@stargrave.org)
+# Copyright (C) 2013-2016 Sergey Matveev (stargrave@stargrave.org)
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -50,6 +50,7 @@ add)
         echo "$result"
         exit
     fi
+    [ -n "$result" ] || exit 1
     echo $result
     if [ -e "$result"/data ]; then
         echo -n "Associated data: "