Redirect error to /dev/null 35/63035/1
authorTim Johnson <tijohnson@linuxfoundation.org>
Tue, 4 Feb 2020 22:37:32 +0000 (14:37 -0800)
committerTim Johnson <tijohnson@linuxfoundation.org>
Tue, 4 Feb 2020 22:37:32 +0000 (14:37 -0800)
Change-Id: I5e02875c033b8bda4c293b9b3842f26f3ca6133a
Signed-off-by: Tim Johnson <tijohnson@linuxfoundation.org>
shell/job-cost.sh

index 34ab5e7..769b972 100644 (file)
@@ -59,7 +59,7 @@ url="https://pricing.vexxhost.net/v1/pricing/$instance_type/cost?seconds=$uptime
 json_block=$(curl -s "$url")
 
 # check if JSON returned and can be parsed
-if jq <<< "$json_block"; then
+if jq <<< "$json_block" > /dev/null 2>&1; then
     cost=$(jq .cost <<< "$json_block")
     resource=$(jq .resource <<< "$json_block" | tr -d '"')
 else