Skip to content

Load subcollection configuration for implicit default tasks - #1108

Open
0xeriiic wants to merge 1 commit into
pyinvoke:mainfrom
0xeriiic:fix-default-subcollection-config
Open

0xeriiic wants to merge 1 commit into
pyinvoke:mainfrom
0xeriiic:fix-default-subcollection-config

Conversation

@0xeriiic

@0xeriiic 0xeriiic commented Dec 4, 2026

Copy link
Copy Markdown

When a subcollection is set as the root default, invoking the program without arguments runs the same task as naming the subcollection explicitly, but the implicit invocation loses the subcollection's configuration. The executor creates the default call without the name needed for its configuration lookup.

Set called_as to the registered default name when normalizing the implicit call. The regression test exercises Executor.execute() with no arguments and checks that the default task sees its subcollection's configuration.

Tests: 38 executor tests passed on Windows with Python 3.13. The shared test setup imports termios, so the test launcher supplied an import-only placeholder. Also ran both forms of the command through Program.run.

OpenAI Codex assisted with reproducing the bug, writing the change and regression test, and preparing this draft.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant