Fixed gen arguments preferring update mode regardless of arguments

Former-commit-id: 6854fff9cce1db65f4784265f3ba4bfc1efa33a6
Former-commit-id: 67a2d47e1f6ccd8bf6bc957aec575c72d8c8ff90
This commit is contained in:
2023-02-27 16:17:16 -05:00
parent 2c17a6b711
commit 6aa9a663b5
+2 -1
View File
@@ -715,7 +715,8 @@ def gen(): # generates a password for a new or an existing entry
else:
_entry_name = entry_name_fetch()
_shm_folder, _shm_entry = shm_gen()
if arg_count > 1 and arguments[arg_start_p] in ('update', '-u'): # gen update
if ((arg_count == 2 and arg_start == 0) or (arg_count == 3 and arg_start == 1)) and arguments[arg_start_p] \
in ('update', '-u'): # gen update
if not Path(f"{directory}{_entry_name}.gpg").is_file():
print(f"\n\u001b[38;5;9merror: entry (/{_entry_name}) does not exist\u001b[0m\n")
s_exit(2)