Skip to content

Commit ddafb91

Browse files
author
openclaw-installer-sync[bot]
committed
chore: sync installers from openclaw 68319592942a
1 parent a9dbaa0 commit ddafb91

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

public/install.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,8 +1385,8 @@ DRY_RUN=${OPENCLAW_DRY_RUN:-0}
13851385
INSTALL_METHOD=${OPENCLAW_INSTALL_METHOD:-}
13861386
OPENCLAW_VERSION=${OPENCLAW_VERSION:-latest}
13871387
USE_BETA=${OPENCLAW_BETA:-0}
1388-
GIT_DIR_DEFAULT="$(resolve_openclaw_effective_home)/openclaw"
1389-
GIT_DIR=${OPENCLAW_GIT_DIR:-$GIT_DIR_DEFAULT}
1388+
GIT_DIR=${OPENCLAW_GIT_DIR:-"$(resolve_openclaw_effective_home)/openclaw"}
1389+
GIT_DIR_EXPLICIT=${OPENCLAW_GIT_DIR:+1}
13901390
GIT_UPDATE=${OPENCLAW_GIT_UPDATE:-1}
13911391
NPM_LOGLEVEL="${OPENCLAW_NPM_LOGLEVEL:-error}"
13921392
NPM_SILENT_FLAG="--silent"
@@ -1504,6 +1504,7 @@ parse_args() {
15041504
return 2
15051505
fi
15061506
GIT_DIR="$2"
1507+
GIT_DIR_EXPLICIT=${2:+1}
15071508
shift 2
15081509
;;
15091510
--no-git-update)
@@ -3774,12 +3775,11 @@ main() {
37743775
had_npm_owner=true
37753776
fi
37763777

3777-
local repo_dir="$GIT_DIR"
3778-
if [[ -n "$detected_checkout" ]]; then
3779-
repo_dir="$detected_checkout"
3778+
final_git_dir="$GIT_DIR"
3779+
if [[ -z "$GIT_DIR_EXPLICIT" && -n "$detected_checkout" ]]; then
3780+
final_git_dir="$detected_checkout"
37803781
fi
3781-
final_git_dir="$repo_dir"
3782-
install_openclaw_from_git "$repo_dir"
3782+
install_openclaw_from_git "$final_git_dir"
37833783
if [[ "$had_npm_owner" == "true" ]]; then
37843784
retire_npm_owner_after_git_install || return $?
37853785
fi

0 commit comments

Comments
 (0)