mirror of
https://github.com/certbot/certbot.git
synced 2026-07-28 08:45:22 +02:00
When getopts is called multiple time we need to reset OPTIND. (#3475)
Not resetting OPTIND between each call of getopts skips all short args except the first one. It fixes this automated command: ./certbot-auto certonly --webroot -w /tmp -d example.com --agree-tos --email contact@example.com -n Where "-w" was parsed by getopts and not "-n" * When getopts is called multiple time we need to reset OPTIND. Issue #3459 * Adding OPTIND reset in the certbot-auto source file * Building new letsencrypt-auto from template
This commit is contained in:
@@ -58,6 +58,7 @@ for arg in "$@" ; do
|
||||
--verbose)
|
||||
VERBOSE=1;;
|
||||
-[!-]*)
|
||||
OPTIND=1
|
||||
while getopts ":hnvq" short_arg $arg; do
|
||||
case "$short_arg" in
|
||||
h)
|
||||
|
||||
@@ -58,6 +58,7 @@ for arg in "$@" ; do
|
||||
--verbose)
|
||||
VERBOSE=1;;
|
||||
-[!-]*)
|
||||
OPTIND=1
|
||||
while getopts ":hnvq" short_arg $arg; do
|
||||
case "$short_arg" in
|
||||
h)
|
||||
|
||||
Reference in New Issue
Block a user