Skip to content

CLI 0.2.10: --template URL makes trailing project_directory look like an --addons value #245

Description

@ulises-jeremias

Bug

_expand_variadic_option sets saw_positional = True for any non-dash token, including values of --template / other options. After --template file://…, a trailing project_directory after --addons is not peeled and is resolved as a catalog slug:

Invalid catalog slug: 'scaffold-check'

Repro

uvx create-awesome-python-app@0.2.10 \
--template "file://$PWD?subdir=templates/fastapi-starter" \
--no-interactive --no-install \
--addons "file://$PWD?subdir=extensions/github-setup" \
/tmp/my-api

Workaround

Put the project directory before options (cpa my-api --template … --addons …), which cpa-templates L3 will use until this is fixed.

Fix

Only mark saw_positional for tokens that are not values of a preceding option flag (e.g. when out[-1] is not a value-taking option like --template / -t / --set / …).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions