generated from Luis/nextjs-python-web-template
Merge pull request 'Add nixos module to import secrets automatically' (#154) from Mic92-mic92 into main
This commit is contained in:
@@ -1,15 +1,17 @@
|
||||
import argparse
|
||||
import sys
|
||||
from types import ModuleType
|
||||
from typing import Optional
|
||||
|
||||
from . import admin, config, secrets, update
|
||||
from .errors import ClanError
|
||||
from .ssh import cli as ssh_cli
|
||||
|
||||
has_argcomplete = True
|
||||
argcomplete: Optional[ModuleType] = None
|
||||
try:
|
||||
import argcomplete
|
||||
import argcomplete # type: ignore[no-redef]
|
||||
except ImportError:
|
||||
has_argcomplete = False
|
||||
pass
|
||||
|
||||
|
||||
# this will be the entrypoint under /bin/clan (see pyproject.toml config)
|
||||
@@ -34,7 +36,7 @@ def main() -> None:
|
||||
)
|
||||
update.register_parser(parser_update)
|
||||
|
||||
if has_argcomplete:
|
||||
if argcomplete:
|
||||
argcomplete.autocomplete(parser)
|
||||
|
||||
if len(sys.argv) == 1:
|
||||
|
||||
@@ -43,7 +43,7 @@ def get_user_name(user: str) -> str:
|
||||
"""Ask the user for their name until a unique one is provided."""
|
||||
while True:
|
||||
name = input(
|
||||
f"Enter your user name for which your sops key will be stored in the repository [default: {user}]: "
|
||||
f"Your key is not yet added to the repository. Enter your user name for which your sops key will be stored in the repository [default: {user}]: "
|
||||
)
|
||||
if name:
|
||||
user = name
|
||||
|
||||
Reference in New Issue
Block a user