This commit is contained in:
Bohan Yang
2019-05-12 17:05:34 +08:00
parent e368cbbfe3
commit 8001de782b
+5 -1
View File
@@ -19,7 +19,11 @@
set -e set -e
command_exists() { command_exists() {
$sudo command -v "$@" > /dev/null 2>&1 _PATH="$PATH"
PATH="$PATH:/usr/local/sbin:/usr/sbin:/sbin"
command -v "$@" > /dev/null 2>&1
PATH="$_PATH"
unset _PATH
} }
user="$(id -un 2>/dev/null || true)" user="$(id -un 2>/dev/null || true)"