1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 12:06:45 +00:00

Fix workflow errors

This commit is contained in:
Tw93
2025-12-31 22:54:51 +08:00
parent 592f02e6e2
commit fdcaa7fa25
5 changed files with 19 additions and 13 deletions

View File

@@ -61,7 +61,14 @@ ACTION="install"
# Resolve source dir (local checkout, env override, or download).
needs_sudo() {
[[ ! -w "$INSTALL_DIR" ]]
if [[ -e "$INSTALL_DIR" ]]; then
[[ ! -w "$INSTALL_DIR" ]]
return
fi
local parent_dir
parent_dir="$(dirname "$INSTALL_DIR")"
[[ ! -w "$parent_dir" ]]
}
maybe_sudo() {