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
F4076633: D2375.id.diff
Thu, Jan 30, 10:49
F4076617: D2375.diff
Thu, Jan 30, 10:31
Unknown Object (File)
Wed, Jan 29, 06:05
Unknown Object (File)
Wed, Jan 22, 12:00
Unknown Object (File)
Mon, Jan 20, 04:12
Unknown Object (File)
Sun, Jan 12, 12:10
Unknown Object (File)
Sat, Jan 11, 06:17
Unknown Object (File)
Mon, Jan 6, 05:55
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.