mirror of
https://github.com/actions/runner.git
synced 2025-12-10 12:36:23 +00:00
Fix usage of /dev/null and ping flag in run.sh (#968)
- Use /dev/null instead of nul - Use -c instead of -n as a ping flag to specify number of packets to be sent
This commit is contained in:
committed by
TingluoHuang
parent
1ef8ea7a83
commit
01be856eff
@@ -34,14 +34,14 @@ else
|
|||||||
if [ ! -x "$(command -v ping)" ]; then
|
if [ ! -x "$(command -v ping)" ]; then
|
||||||
COUNT="0"
|
COUNT="0"
|
||||||
while [[ $COUNT != 5000 ]]; do
|
while [[ $COUNT != 5000 ]]; do
|
||||||
echo "SLEEP" >nul
|
echo "SLEEP" > /dev/null
|
||||||
COUNT=$[$COUNT+1]
|
COUNT=$[$COUNT+1]
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
ping -n 5 127.0.0.1 >nul
|
ping -c 5 127.0.0.1 > /dev/null
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
sleep 5 >nul
|
sleep 5
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
exit $returnCode
|
exit $returnCode
|
||||||
|
|||||||
Reference in New Issue
Block a user