fix: env.sh failed silently if runit didn't exist

This commit is contained in:
Klesh Wong 2022-05-19 09:07:41 +08:00
parent 1ac2c71659
commit a3b1463f43

2
env.sh
View File

@ -11,7 +11,7 @@ GITHUB_PROXY=${GITHUB_PROXY-$HTTPS_PROXY}
WSL=$(grep -i Microsoft /proc/sys/kernel/osrelease || true) WSL=$(grep -i Microsoft /proc/sys/kernel/osrelease || true)
TMPDIR=${TMPDIR-"/tmp"} TMPDIR=${TMPDIR-"/tmp"}
UNAMEA=$(uname -a) UNAMEA=$(uname -a)
RUNIT=$(command -v runit) RUNIT=$(command -v runit || true)
in_china() { in_china() {
! [ -f $TMPDIR/myip_full ] && curl -s myip.ipip.net > $TMPDIR/myip_full ! [ -f $TMPDIR/myip_full ] && curl -s myip.ipip.net > $TMPDIR/myip_full