← Back to PRs

#10248: fix(update): default dev checkout path to ~/openclaw

by kimgyu open 2026-02-06 08:04 View on GitHub →
cli size: S
## 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