Skip to content

Handle help arg by itself the same as no args#5674

Merged
davidism merged 1 commit intopallets:stablefrom
dunkmann00:cli-help
Mar 29, 2025
Merged

Handle help arg by itself the same as no args#5674
davidism merged 1 commit intopallets:stablefrom
dunkmann00:cli-help

Conversation

@dunkmann00
Copy link
Copy Markdown
Contributor

@dunkmann00 dunkmann00 commented Jan 30, 2025

When the flask command is used with only the --help parameter, this change will make sure to try and load the app before the help callback is run. This was previously only being done when the flask command was used by itself. This meant when passing in --help, any custom commands were not getting shown in the help message. With this change, custom commands will be included in the help message when running flask on the command line by itself or with the --help parameter.

This addresses #5673.

If you want me to update anything else for this PR please let me know!

@davidism davidism added this to the 3.1.1 milestone Mar 29, 2025
@davidism davidism added the cli label Mar 29, 2025
When the 'flask' command is used with only the '--help' parameter, this
change will make sure to try and load the app before the help callback
is run. This was previously only being done when the 'flask' command was
used by itself. This meant when passing in '--help', any custom commands
were not getting shown in the help message. With this change, custom
commands will be included in the help message when running 'flask' on
the command line by itself or with the '--help' parameter.
@davidism davidism changed the base branch from main to stable March 29, 2025 22:13
@davidism davidism merged commit 5ea0ab8 into pallets:stable Mar 29, 2025
13 checks passed
@dunkmann00 dunkmann00 deleted the cli-help branch March 30, 2025 17:48
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants