← Back to PRs

#6786: [Prompt Request] fix: remove dead restore step for gitignored dist/control-ui/

by therealZpoint-bot open 2026-02-02 02:09 View on GitHub →
## Prompt Request This is a prompt for your AI agents to implement the fix. Related: #4546, #4591 --- ## Context The `openclaw update` command reports `Update Result: ERROR` even when the update succeeds. This happens because the restore step tries to `git checkout dist/control-ui/` which is gitignored and not tracked. ## Reproduction ```bash openclaw update # Observe: all steps pass except "restore control-ui" # error: pathspec 'dist/control-ui/' did not match any file(s) known to git # Final status shows ERROR despite successful build ``` ## Root Cause The update runner has a restore step that assumes `dist/control-ui/` is tracked by git. It's in `.gitignore`, so git restore fails. The control-ui is rebuilt fresh anyway, making this restore step unnecessary. ## Expected Behavior - Update should report SUCCESS when build completes successfully - Restore of gitignored paths should either be skipped or not fail the overall update ## Fix Direction In `src/infra/update-runner.ts`: 1. Find the restore step for `dist/control-ui/` (around line 738-747) 2. Remove it entirely (preferred - it's redundant since UI rebuilds), OR wrap it in a try-catch that logs a warning instead of failing 3. Update `gitTotalSteps` count (around line 418) to reflect one fewer step The simplest fix is removal since the "Building UI" step regenerates these files anyway.

Most Similar PRs