mirror of
https://github.com/actions/runner.git
synced 2025-12-10 12:36:23 +00:00
use correct exit code and delay on runner update in run.sh (#963)
Fix runner update script
This commit is contained in:
committed by
TingluoHuang
parent
be598f1e9b
commit
ff55930ef3
@@ -26,10 +26,10 @@ if [[ "$1" == "localRun" ]]; then
|
||||
else
|
||||
"$DIR"/bin/Runner.Listener run $*
|
||||
|
||||
# Return code 4 means the run once runner received an update message.
|
||||
# Sleep 5 seconds to wait for the update process finish and run the runner again.
|
||||
# Return code 3 means the run once runner received an update message.
|
||||
# Sleep 5 seconds to wait for the update process finish
|
||||
returnCode=$?
|
||||
if [[ $returnCode == 4 ]]; then
|
||||
if [[ $returnCode == 3 ]]; then
|
||||
if [ ! -x "$(command -v sleep)" ]; then
|
||||
if [ ! -x "$(command -v ping)" ]; then
|
||||
COUNT="0"
|
||||
@@ -43,8 +43,6 @@ else
|
||||
else
|
||||
sleep 5 >nul
|
||||
fi
|
||||
|
||||
"$DIR"/bin/Runner.Listener run $*
|
||||
else
|
||||
exit $returnCode
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user