Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit db8c6c4

Browse files
committedApr 3, 2025·
chore: propagate writer
1 parent 0bb5374 commit db8c6c4

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed
 

‎docs/data/zz_cli_help.toml

+9
Original file line numberDiff line numberDiff line change
@@ -143,5 +143,14 @@ OPTIONS:
143143
[[command]]
144144
title = "lego dnshelp"
145145
content = """
146+
Credentials for DNS providers must be passed through environment variables.
146147
148+
To display the documentation for a specific DNS provider, run:
149+
150+
$ lego dnshelp -c code
151+
152+
Supported DNS providers:
153+
acme-dns, active24, alidns, allinkl, arvancloud, auroradns, autodns, azure, azuredns, bindman, bluecat, bookmyname, brandit, bunny, checkdomain, civo, clouddns, cloudflare, cloudns, cloudru, cloudxns, conoha, constellix, corenetworks, cpanel, derak, desec, designate, digitalocean, directadmin, dnshomede, dnsimple, dnsmadeeasy, dnspod, dode, domeneshop, dreamhost, duckdns, dyn, dynu, easydns, edgedns, efficientip, epik, exec, exoscale, f5xc, freemyip, gandi, gandiv5, gcloud, gcore, glesys, godaddy, googledomains, hetzner, hostingde, hosttech, httpnet, httpreq, huaweicloud, hurricane, hyperone, ibmcloud, iij, iijdpf, infoblox, infomaniak, internetbs, inwx, ionos, ipv64, iwantmyname, joker, liara, lightsail, limacity, linode, liquidweb, loopia, luadns, mailinabox, manageengine, manual, metaname, metaregistrar, mijnhost, mittwald, myaddr, mydnsjp, mythicbeasts, namecheap, namedotcom, namesilo, nearlyfreespeech, netcup, netlify, nicmanager, nifcloud, njalla, nodion, ns1, oraclecloud, otc, ovh, pdns, plesk, porkbun, rackspace, rainyun, rcodezero, regfish, regru, rfc2136, rimuhosting, route53, safedns, sakuracloud, scaleway, selectel, selectelv2, selfhostde, servercow, shellrent, simply, sonic, spaceship, stackpath, technitium, tencentcloud, timewebcloud, transip, ultradns, variomedia, vegadns, vercel, versio, vinyldns, vkcloud, volcengine, vscale, vultr, webnames, websupport, wedos, westcn, yandex, yandex360, yandexcloud, zoneee, zonomi
154+
155+
More information: https://go-acme.github.io/lego/dns
147156
"""

‎internal/clihelp/generator.go

+9-5
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,18 @@ func createStubApp() *cli.Command {
9797
}
9898
}
9999

100-
func run(ctx context.Context, cmd *cli.Command, args []string) (h commandHelp, err error) {
101-
w := cmd.Writer
102-
defer func() { cmd.Writer = w }()
100+
func run(ctx context.Context, app *cli.Command, args []string) (h commandHelp, err error) {
101+
w := app.Writer
102+
defer func() { app.Writer = w }()
103103

104104
var buf bytes.Buffer
105-
cmd.Writer = &buf
105+
app.Writer = &buf
106106

107-
if err := cmd.Run(ctx, args); err != nil {
107+
if app.Command(args[1]) != nil {
108+
app.Command(args[1]).Writer = app.Writer
109+
}
110+
111+
if err := app.Run(ctx, args); err != nil {
108112
return h, err
109113
}
110114

0 commit comments

Comments
 (0)
Please sign in to comment.