Skip to content

Commit 59b60b8

Browse files
authored
Ensure POSIX compliance for start.sh (#53)
1 parent 547fb98 commit 59b60b8

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

start-local.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -508,20 +508,21 @@ if [ "$available_gb" -lt "$required" ]; then
508508
echo "executed in read-only mode. Please free up disk space to resolve this issue."
509509
echo "----------------------------------------------------------------------------"
510510
echo "Press ENTER to confirm."
511-
read -r
511+
# shellcheck disable=SC2034
512+
read -r line
512513
fi
513514
EOM
514515
if [ "$need_wait_for_kibana" = true ]; then
515516
cat >> start.sh <<-'EOM'
516517
wait_for_kibana() {
517-
local timeout="${1:-60}"
518+
_timeout="${1:-60}"
518519
echo "- Waiting for Kibana to be ready"
519520
echo
520-
local start_time="$(date +%s)"
521+
_start_time="$(date +%s)"
521522
until curl -s -I http://localhost:5601 | grep -q 'HTTP/1.1 302 Found'; do
522-
elapsed_time="$(($(date +%s) - start_time))"
523-
if [ "$elapsed_time" -ge "$timeout" ]; then
524-
echo "Error: Kibana timeout of ${timeout} sec"
523+
elapsed_time="$(($(date +%s) - _start_time))"
524+
if [ "$elapsed_time" -ge "$_timeout" ]; then
525+
echo "Error: Kibana timeout of ${_timeout} sec"
525526
exit 1
526527
fi
527528
sleep 2

0 commit comments

Comments
 (0)