Make an API key name of "-" not actually fetch a key

This commit is contained in:
Jeff Epler 2024-10-23 14:04:37 -05:00
parent b939bba50f
commit 9340d3551c

View file

@ -44,6 +44,8 @@ if USE_PASSWORD_STORE.exists():
@functools.cache
def get_key(name: str, what: str = "api key") -> str:
if name == "-":
return "-"
key_path = f"{pass_prefix}{name}"
command = pass_command + [key_path]
return subprocess.check_output(command, encoding="utf-8").split("\n")[0]