#10248: fix(update): default dev checkout path to ~/openclaw
cli
size: S
Cluster:
Gateway and System Fixes
## Summary
- change the default git checkout path for `openclaw update --channel dev` from `~/.openclaw` to `~/openclaw`
- add a unit test that verifies the update wizard prompt defaults to an `.../openclaw` checkout path when `OPENCLAW_GIT_DIR` is unset
## Why
- `~/.openclaw` is normally used as the state/config directory and is often non-empty but not a git repo
- switching to `dev` from package installs can fail with `OPENCLAW_GIT_DIR points at a non-git directory`
## Testing
- `pnpm vitest run src/cli/update-cli.test.ts`
## AI assistance
- [x] AI-assisted
- Testing degree: lightly tested (targeted unit test)
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
- Changes the default git checkout path used when switching to the `dev` update channel from `~/.openclaw` to `~/openclaw` (`DEFAULT_GIT_DIR`).
- Adds a unit test asserting the update wizard’s prompt defaults to an `.../openclaw` path when `OPENCLAW_GIT_DIR` is unset.
- This affects only the git-update onboarding path (`updateWizardCommand` / `resolveGitInstallDir`) when moving from package installs to a git checkout; existing overrides via `OPENCLAW_GIT_DIR` remain unchanged.
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk.
- The functional change is a single constant update to the default dev git checkout directory and is covered by a targeted wizard test; no runtime-critical logic paths were otherwise modified.
- src/cli/update-cli.test.ts (test brittleness only)
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#6235: fix: from source development command
by witcxc · 2026-02-01
80.8%
#17912: fix: configure git to use HTTPS instead of SSH for GitHub URLs
by MisterGuy420 · 2026-02-16
78.5%
#17237: fix(update): guard post-install imports after npm global update
by tdjackey · 2026-02-15
78.1%
#18723: fix: use resolveEffectiveUpdateChannel to detect git tags for defau...
by MisterGuy420 · 2026-02-17
77.6%
#16016: fix: update systemd unit version on gateway restart
by jbold · 2026-02-14
76.9%
#17916: [ fix ] : correct config directory path during onboarding
by Dijo-404 · 2026-02-16
76.8%
#11048: fix: address repository issues (env, author, CI comments, security ...
by cavula · 2026-02-07
76.0%
#6064: fix(daemon): prefer bundled node from install-cli.sh over system node
by joyshmitz · 2026-02-01
75.8%
#12368: fix(cron): respect OPENCLAW_STATE_DIR for cron store path
by ComBba · 2026-02-09
75.4%
#8203: fix clawdbot references
by anton-roos · 2026-02-03
75.3%