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

[Minor] Ignore or complain about custom commands which don't have required annotations #2633

Closed
rfay opened this issue Nov 11, 2020 · 0 comments

Comments

@rfay
Copy link
Member

rfay commented Nov 11, 2020

Describe the bug

Apparently in v1.16+, custom/script commands that don't have a "Usage" annotation don't get properly shown in the list of commands (they're without a command name).

To Reproduce

Use this command as .ddev/comamnds/web/badcmd:

#!/bin/bash
## Description: This command won't show up properly

tr -cd '[:alnum:]' < /dev/urandom | fold -w32 | head -n1

If you type ddev you'll see it doesn't get labelled correctly:

Create and maintain a local web development environment.
Docs: https://ddev.readthedocs.io
Support: https://ddev.readthedocs.io/en/stable/#support

Usage:
  ddev [command]

Available Commands:
                   This command won't show up properly (shell web container command)
  auth             A collection of authentication commands

Expected behavior

In v1.15.3 a command like this would work, with the name of the script as the name.

IMO it's fine for commands to require the Usage annotation, but if they don't have it ddev should complain I think.

Note that this command works fine in .ddev/commands/web/ttpwd:

#!/bin/bash
## Description: Generate 32 character alphanumeric password
## Usage: ttpwd

tr -cd '[:alnum:]' < /dev/urandom | fold -w32 | head -n1
@rfay rfay added this to the v1.17 milestone Nov 11, 2020
gilbertsoft added a commit to gilbertsoft/ddev that referenced this issue Nov 12, 2020
rfay pushed a commit to gilbertsoft/ddev that referenced this issue Nov 13, 2020
rfay pushed a commit to gilbertsoft/ddev that referenced this issue Nov 17, 2020
@rfay rfay closed this as completed in 3362613 Nov 20, 2020
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

No branches or pull requests

1 participant