Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: CLI plugin commands still not showing in command list #2783

Open
1 of 4 tasks
LonelyVikingMichael opened this issue Nov 28, 2023 · 6 comments
Open
1 of 4 tasks
Labels
Bug 🐛 This is something that is not working as expected CLI This is related to our CLI

Comments

@LonelyVikingMichael
Copy link
Contributor

LonelyVikingMichael commented Nov 28, 2023

Description

This is not working despite the fix in #2441

Perhaps something is wrong with the setup?
https://github.com/LonelyVikingMichael/litestar-users/blob/main/litestar_users/cli.py

See screenshot below

URL to code causing the issue

https://github.com/LonelyVikingMichael/litestar-users

MCVE

N/A

Steps to reproduce

1. Clone `litestar-users`
2. Install poetry if not present
3. Execute `poetry update` to updatet to Litestar 2.4.0
4. Execute `litestar --app examples.basic:app --help`
5. Note that the `users` command is missing
6. Execute `litestar --app examples.basic:app users --help`
7. Note that `user` subcommands are now listed

Screenshots

CLI issue

Logs

N/A

Litestar Version

2.4.0

Platform

  • Linux
  • Mac
  • Windows
  • Other (Please specify in the description above)
@LonelyVikingMichael LonelyVikingMichael added Bug 🐛 This is something that is not working as expected Triage Required 🏥 This requires triage labels Nov 28, 2023
@peterschutt
Copy link
Contributor

That was erroneously included in the changelog - if you check the pr that supposedly closed it, it was accidentally merged, and then reverted.

@LonelyVikingMichael
Copy link
Contributor Author

That was erroneously included in the changelog - if you check the pr that supposedly closed it, it was accidentally merged, and then reverted.

No problem, shall we keep this open anyway?

@peterschutt
Copy link
Contributor

Unless there's an original issue that it should be reopened - I know my name is all over that closed PR but its not actually anything I worked on, I just split it out from another PR.

@guacs
Copy link
Member

guacs commented Nov 28, 2023

@LonelyVikingMichael not sure if this will help, but can you try adding the following to your pyproject.toml?

[tool.poetry.scripts]
app = "litestar.__main__:run_cli"

@provinzkraut provinzkraut removed the Triage Required 🏥 This requires triage label Nov 28, 2023
@provinzkraut
Copy link
Member

So, the changes were merged and released, just not in #2441, but in #2735. Apparently this wasn't the fix though

@LonelyVikingMichael
Copy link
Contributor Author

@LonelyVikingMichael not sure if this will help, but can you try adding the following to your pyproject.toml?

[tool.poetry.scripts]
app = "litestar.__main__:run_cli"

This is third-party library code, it won't be relevant to end users in this case

@JacobCoffee JacobCoffee added the CLI This is related to our CLI label Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐛 This is something that is not working as expected CLI This is related to our CLI
Projects
Status: Triage
Development

No branches or pull requests

5 participants