Skip to content

Commit

Permalink
gupload: _cleanup_config: Don't try to parse empty lines
Browse files Browse the repository at this point in the history
will lead to _cleanup of whole config if access token expiry is missing
  • Loading branch information
Akianonymus committed Nov 11, 2020
1 parent a4f47f3 commit 28cd628
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bash/release/gupload
Expand Up @@ -1016,7 +1016,7 @@ _cleanup_config() {

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

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

Expand Down
2 changes: 1 addition & 1 deletion bash/upload.bash
Expand Up @@ -76,7 +76,7 @@ _cleanup_config() {

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

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

Expand Down
2 changes: 1 addition & 1 deletion sh/release/gupload
Expand Up @@ -1003,7 +1003,7 @@ _cleanup_config() {
! [ -f "${config}" ] && return 0
while read -r line <&4; do
while read -r line <&4 && [ -n "${line}" ]; do
expiry_value_name="${line%%=*}"
token_value_name="${expiry_value_name%%_EXPIRY}"
Expand Down
2 changes: 1 addition & 1 deletion sh/upload.sh
Expand Up @@ -77,7 +77,7 @@ _cleanup_config() {

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

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

Expand Down

0 comments on commit 28cd628

Please sign in to comment.