mirror of
https://github.com/actions/runner.git
synced 2025-12-11 12:57:05 +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
|
else
|
||||||
"$DIR"/bin/Runner.Listener run $*
|
"$DIR"/bin/Runner.Listener run $*
|
||||||
|
|
||||||
# Return code 4 means the run once runner received an update message.
|
# Return code 3 means the run once runner received an update message.
|
||||||
# Sleep 5 seconds to wait for the update process finish and run the runner again.
|
# Sleep 5 seconds to wait for the update process finish
|
||||||
returnCode=$?
|
returnCode=$?
|
||||||
if [[ $returnCode == 4 ]]; then
|
if [[ $returnCode == 3 ]]; then
|
||||||
if [ ! -x "$(command -v sleep)" ]; then
|
if [ ! -x "$(command -v sleep)" ]; then
|
||||||
if [ ! -x "$(command -v ping)" ]; then
|
if [ ! -x "$(command -v ping)" ]; then
|
||||||
COUNT="0"
|
COUNT="0"
|
||||||
@@ -43,8 +43,6 @@ else
|
|||||||
else
|
else
|
||||||
sleep 5 >nul
|
sleep 5 >nul
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"$DIR"/bin/Runner.Listener run $*
|
|
||||||
else
|
else
|
||||||
exit $returnCode
|
exit $returnCode
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user