Skip to content

fix(update): skip unmanaged local files silently, consolidate find loops#328

Open
bcdady wants to merge 2 commits into
darrenhinde:mainfrom
bcdady:main
Open

fix(update): skip unmanaged local files silently, consolidate find loops#328
bcdady wants to merge 2 commits into
darrenhinde:mainfrom
bcdady:main

Conversation

@bcdady

@bcdady bcdady commented Jun 27, 2026

Copy link
Copy Markdown

Description

Previously, any file present locally but absent from the remote repo produced a Could not update warning — identical in appearance to a genuine failure. In practice this affects every installation: users commonly have local-only files (custom commands, skills, config) sitting alongside OAC-managed files in the same directory.

Two changes:

  1. Silent skip for unmanaged files — a 404 response is no longer treated as a failure. Local-only files are counted and shown in the summary line only.
  2. Consolidated find — three sequential find/loop blocks (md, ts, sh) replaced with a single pass.

Also replaces the per-file backup/restore mechanism with a single shared temp file. Downloading to temp before overwriting the destination achieves the same safety guarantee (no partial overwrites) with less code.

Summary line before:

Updated: 3 file(s), failed: 47 file(s)

Summary line after:

Updated: 3 | Skipped (local-only): 47 | Failed: 0

Type of Change

  • New feature (agent, command, tool)
  • Bug fix
  • Documentation
  • Refactoring
  • CI/CD

Checklist

  • Tests pass locally
  • Documentation updated (if needed)
  • Follows CONTRIBUTING.md

Testing

Ran update.sh --install-dir ~/.config/opencode against a global install directory containing ~130 OAC-managed files and ~16 local-only files. Local-only files were silently skipped and counted; OAC-managed files were updated as expected. No backup files left behind.

@bcdady bcdady changed the title fix: skip unmanaged local files silently, consolidate find loops fix(update): skip unmanaged local files silently, consolidate find loops Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant