Page MenuHomeDevCentral

Allow certbot wrapper to work when no argument is provided after the command
ClosedPublic

Authored by dereckson on Dec 30 2020, 02:19.
Tags
None
Referenced Files
F3917949: D2375.id.diff
Fri, Dec 20, 05:14
F3917661: D2375.diff
Fri, Dec 20, 04:35
Unknown Object (File)
Wed, Dec 18, 18:24
Unknown Object (File)
Wed, Dec 18, 18:03
Unknown Object (File)
Tue, Dec 17, 01:46
Unknown Object (File)
Tue, Dec 17, 01:38
Unknown Object (File)
Tue, Dec 17, 01:38
Unknown Object (File)
Thu, Dec 12, 15:00
Subscribers
None

Details

Summary

Fixes T1640.

Test Plan

Tested on docker-001:

$ certbot renew
Saving debug log to /var/log/letsencrypt/letsencrypt.log
[...]

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dereckson created this revision.
Another way to solve this according https://github.com/koalaman/shellcheck/wiki/SC2086:

Quoting this doesn't work, since in the default case, "$debug" would expand to one empty argument while $debug would expand into zero arguments. In this case, you can use an array with zero or one elements as outlined above, or you can use an unquoted expansion with an alternate value:

debug=""
[[ $1 == "--trace-commands" ]] && debug="yes"
bash ${debug:+"-x"} script

This is better than an unquoted value because the alternative value can be properly quoted, e.g. wget ${output:+ -o "$output"}.

This revision is now accepted and ready to land.Dec 30 2020, 02:22
This revision was landed with ongoing or failed builds.Dec 30 2020, 02:23
This revision was automatically updated to reflect the committed changes.