mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-08-28 04:46:34 -04:00
Fixed gen arguments preferring update mode regardless of arguments
Former-commit-id: 6854fff9cce1db65f4784265f3ba4bfc1efa33a6 Former-commit-id: 67a2d47e1f6ccd8bf6bc957aec575c72d8c8ff90
This commit is contained in:
+2
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user