Skip to content

Commit

Permalink
[LINT] - Linting the Watch Logs Script (#947)
Browse files Browse the repository at this point in the history
Running shfmt on the bash scripts
  • Loading branch information
gambol99 authored Aug 8, 2023
1 parent 39baa8c commit bce6c40
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions images/assets/watch_logs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ stream_logs() {
if curl --no-buffer --silent "${FLAG_ENDPOINT}" | tee ${FLAG_LOGFILE}; then
if grep "failed to retrieve the logs" "${FLAG_LOGFILE}"; then
echo "[info] Terranetes Controller was unable to retrieve logs, the Job Pod may not be available yet."
i=$((i+1))
i=$((i + 1))
else
LOGS_FETCHED=true
return
fi
else
echo "[warning] Terranetes Controller not reachable, unable to fetch logs."
i=$((i+1))
i=$((i + 1))
fi
done
}
Expand Down Expand Up @@ -104,8 +104,10 @@ while getopts 'e:f:d:r:h' flag; do
d) FLAG_DELAY="${OPTARG}" ;;
r) FLAG_MAX_RETRIES="${OPTARG}" ;;
h) print_usage && exit 0 ;;
*) print_usage
exit 1 ;;
*)
print_usage
exit 1
;;
esac
done

Expand Down

0 comments on commit bce6c40

Please sign in to comment.