INNER CODE UNIT · Python

confirm

mtkennerly/ludusavi · tasks.py:30

def confirm(prompt: str):
    response = input(f"Confirm by typing '{prompt}': ")
    if response.lower() != prompt.lower():
        sys.exit(1)


@task
def version(ctx):
    print(get_version())


@task
def legal(ctx):
    version = get_version()
    txt_name = f"ludusavi-v{version}-legal.txt"
    txt_path = ROOT / "dist" / txt_name
    try:
        ctx.run(f'cargo lichking bundle --file "{txt_path}"', hide=True)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…