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
F2849034: D2375.diff
Thu, Apr 25, 01:10
Unknown Object (File)
Mon, Apr 22, 23:57
Unknown Object (File)
Mon, Apr 22, 17:11
Unknown Object (File)
Fri, Apr 19, 08:17
Unknown Object (File)
Thu, Apr 18, 18:09
Unknown Object (File)
Thu, Apr 18, 17:32
Unknown Object (File)
Wed, Apr 17, 23:56
Unknown Object (File)
Mon, Apr 15, 01:34
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.