Skip to content

Commit c7a5b72

Browse files
committed
Improve compatibility by replacing use of seq with a native for-loop
Closes gh-21068
1 parent 76d71e5 commit c7a5b72

File tree

1 file changed

+2
-2
lines changed
  • spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/resources/org/springframework/boot/loader/tools

1 file changed

+2
-2
lines changed

spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/resources/org/springframework/boot/loader/tools/launch.script

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ stop() {
223223

224224
do_stop() {
225225
kill "$1" &> /dev/null || { echoRed "Unable to kill process $1"; return 1; }
226-
for i in $(seq 1 $STOP_WAIT_TIME); do
226+
for ((i = 1; i <= STOP_WAIT_TIME; i++)); do
227227
isRunning "$1" || { echoGreen "Stopped [$1]"; rm -f "$2"; return 0; }
228228
[[ $i -eq STOP_WAIT_TIME/2 ]] && kill "$1" &> /dev/null
229229
sleep 1
@@ -241,7 +241,7 @@ force_stop() {
241241

242242
do_force_stop() {
243243
kill -9 "$1" &> /dev/null || { echoRed "Unable to kill process $1"; return 1; }
244-
for i in $(seq 1 $STOP_WAIT_TIME); do
244+
for ((i = 1; i <= STOP_WAIT_TIME; i++)); do
245245
isRunning "$1" || { echoGreen "Stopped [$1]"; rm -f "$2"; return 0; }
246246
[[ $i -eq STOP_WAIT_TIME/2 ]] && kill -9 "$1" &> /dev/null
247247
sleep 1

0 commit comments

Comments
 (0)