mirror of
https://github.com/wnlen/clash-for-linux.git
synced 2026-03-21 22:06:45 +08:00
Update run_clash.sh
This commit is contained in:
@ -56,10 +56,11 @@ fi
|
|||||||
test_config() {
|
test_config() {
|
||||||
local bin="$1"
|
local bin="$1"
|
||||||
local config="$2"
|
local config="$2"
|
||||||
"$bin" -t -f "$config" >/dev/null 2>&1
|
local runtime_dir="$3"
|
||||||
|
"$bin" -d "$runtime_dir" -t -f "$config" >/dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
if ! test_config "$CLASH_BIN" "$CONFIG_FILE"; then
|
if ! test_config "$CLASH_BIN" "$CONFIG_FILE" "$RUNTIME_DIR"; then
|
||||||
echo "[ERROR] config test failed: $CONFIG_FILE" >&2
|
echo "[ERROR] config test failed: $CONFIG_FILE" >&2
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user