Skip to content

Commit 673e16d

Browse files
committed
Trying another way to trim whitespace. RE:natcap#1580
1 parent d9ba157 commit 673e16d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

codesigning/signing-worker/natcap-codesign.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ while true
88
do
99
DATA=$(curl -i -H "Accept: application/json" "https://us-west1-natcap-servers.cloudfunctions.net/codesigning-queue{\"token\": \"$ACCESS_TOKEN\"}")
1010
# The response body will be empty when there is nothing in the queue.
11-
if [ -z $(echo "$DATA" | xargs) ]; then # echo | xargs will trim all whitespace.
11+
if [ -z $(echo -e "$DATA" | tr -d '[:space:]') ]; then
12+
echo "No queued requests, waiting 30 seconds..."
1213
continue
1314
else
1415
BASENAME=$(jq ".basename" <<< $DATA)

0 commit comments

Comments
 (0)