fix: clarify dirty dev update error

This commit is contained in:
Peter Steinberger
2026-04-06 00:57:40 +01:00
parent 379bc1c032
commit c4cc557604
3 changed files with 41 additions and 8 deletions

View File

@@ -1012,11 +1012,15 @@ export async function updateCommand(opts: UpdateCommandOptions): Promise<void> {
if (result.status === "skipped") {
if (result.reason === "dirty") {
defaultRuntime.error(theme.error("Update blocked: local files are edited in this checkout."));
defaultRuntime.log(
theme.warn(
"Skipped: working directory has uncommitted changes. Commit or stash them first.",
"Git-based updates need a clean working tree before they can switch commits, fetch, or rebase.",
),
);
defaultRuntime.log(
theme.muted("Commit, stash, or discard the local changes, then rerun `openclaw update`."),
);
}
if (result.reason === "not-git-install") {
defaultRuntime.log(