Skip to content

Commit 28cd628

Browse files
committed
gupload: _cleanup_config: Don't try to parse empty lines
will lead to _cleanup of whole config if access token expiry is missing
1 parent a4f47f3 commit 28cd628

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

bash/release/gupload

+1-1
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,7 @@ _cleanup_config() {
10161016

10171017
! [ -f "${config}" ] && return 0
10181018

1019-
while read -r line; do
1019+
while read -r line && [[ -n ${line} ]]; do
10201020
expiry_value_name="${line%%=*}"
10211021
token_value_name="${expiry_value_name%%_EXPIRY}"
10221022

bash/upload.bash

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ _cleanup_config() {
7676

7777
! [ -f "${config}" ] && return 0
7878

79-
while read -r line; do
79+
while read -r line && [[ -n ${line} ]]; do
8080
expiry_value_name="${line%%=*}"
8181
token_value_name="${expiry_value_name%%_EXPIRY}"
8282

sh/release/gupload

+1-1
Original file line numberDiff line numberDiff line change
@@ -1003,7 +1003,7 @@ _cleanup_config() {
10031003
10041004
! [ -f "${config}" ] && return 0
10051005
1006-
while read -r line <&4; do
1006+
while read -r line <&4 && [ -n "${line}" ]; do
10071007
expiry_value_name="${line%%=*}"
10081008
token_value_name="${expiry_value_name%%_EXPIRY}"
10091009

sh/upload.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ _cleanup_config() {
7777

7878
! [ -f "${config}" ] && return 0
7979

80-
while read -r line <&4; do
80+
while read -r line <&4 && [ -n "${line}" ]; do
8181
expiry_value_name="${line%%=*}"
8282
token_value_name="${expiry_value_name%%_EXPIRY}"
8383

0 commit comments

Comments
 (0)