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

caddycmd: Add --skip-standard to list-modules command, quieter output #4386

Merged
merged 2 commits into from
Oct 18, 2021

Conversation

francislavoie
Copy link
Member

Tiny little improvement.

The list-modules command is useful to get some quick details at a glance of what's in a Caddy build. In cases where you only really care to know the main version of Caddy plus which plugins were successfully pulled in, I think it's useful to hide the standard modules from the output, since there's currently 83 of them, lots of lines in the output that can be quieted when we know they'll always be listed.

Example output:

$ caddy list-modules --skip-standard --versions --packages

dns.providers.duckdns v0.3.1 github.com/caddy-dns/duckdns

  Non-standard modules: 1

  Unknown modules: 0

@francislavoie francislavoie added the under review 🧐 Review is pending before merging label Oct 16, 2021
@francislavoie francislavoie added this to the v2.4.6 milestone Oct 16, 2021
@francislavoie francislavoie requested a review from mholt October 16, 2021 04:13
@francislavoie francislavoie force-pushed the list-modules-skip-standard branch from 6009cd2 to ca1aae6 Compare October 16, 2021 04:14
@francislavoie francislavoie force-pushed the list-modules-skip-standard branch from ca1aae6 to 0f54961 Compare October 16, 2021 04:16
@mholt
Copy link
Member

mholt commented Oct 18, 2021

I can appreciate this, but I also question its utility. Will people really go to the extra work of typing --skip-standard when they can just as well scan for the count, which already appears toward the end of the output (near where their next prompt is, so they don't have to scroll)? I feel like looking for the count in the current output is easier than typing --skip-standard.

@francislavoie
Copy link
Member Author

In case you didn't notice, I also used it for the output of the caddy upgrade family, which makes those less noisy as well.

This isn't meant for users directly typing out the command, it's more for automated scripts to be less noisy by avoiding redundant information from being printed.

Copy link
Member

@mholt mholt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see. Hmm. I guess that's okay. Simple, nonintrusive change, so might as well. Thanks!

@mholt mholt merged commit 062657d into master Oct 18, 2021
@francislavoie francislavoie deleted the list-modules-skip-standard branch October 18, 2021 18:27
@mholt mholt removed the under review 🧐 Review is pending before merging label Jan 6, 2022
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.

2 participants