mirror of
https://github.com/actions/runner.git
synced 2025-12-10 04:06:57 +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
|
||||
COUNT="0"
|
||||
while [[ $COUNT != 5000 ]]; do
|
||||
echo "SLEEP" >nul
|
||||
echo "SLEEP" > /dev/null
|
||||
COUNT=$[$COUNT+1]
|
||||
done
|
||||
else
|
||||
ping -n 5 127.0.0.1 >nul
|
||||
ping -c 5 127.0.0.1 > /dev/null
|
||||
fi
|
||||
else
|
||||
sleep 5 >nul
|
||||
sleep 5
|
||||
fi
|
||||
else
|
||||
exit $returnCode
|
||||
|
||||
Reference in New Issue
Block a user