mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2026-01-02 02:02:09 +08:00
Use file descriptor 3 for main deployment loop
Before this, some deployment scripts would interact with STDIN and that would cause this loop to skip some elements. By using descriptor 3 we avoid clashing with the very common stdin and stdout.
This commit is contained in:
@@ -235,7 +235,7 @@ _deploy_services() {
|
||||
|
||||
_failedServices=""
|
||||
_failedCount=0
|
||||
while read -r _service; do
|
||||
while read -r _service <&3; do
|
||||
_debug2 "Service" "$_service"
|
||||
_hook=$(yq e ".services[] | select(.name == \"$_service\").hook" "$_deploy_file")
|
||||
_envs=$(yq e ".services[] | select(.name == \"$_service\").environment" "$_deploy_file")
|
||||
@@ -246,7 +246,7 @@ _deploy_services() {
|
||||
_failedCount=$((_failedCount + 1))
|
||||
fi
|
||||
_clear_envs "$_envs"
|
||||
done < "$_tempfile"
|
||||
done 3< "$_tempfile"
|
||||
|
||||
_debug3 "Failed services" "$_failedServices"
|
||||
_debug2 "Failed count" "$_failedCount"
|
||||
|
||||
Reference in New Issue
Block a user