Skip to content

Fail install-plugin.sh when an expected location is skipped (#200) - #210

Merged
deverman merged 1 commit into
masterfrom
issue-200-installer-partial-detection
Aug 2, 2026
Merged

Fail install-plugin.sh when an expected location is skipped (#200)#210
deverman merged 1 commit into
masterfrom
issue-200-installer-partial-detection

Conversation

@deverman

@deverman deverman commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Closes #200. The diagnostic half shipped in #201; this is the installer half.

The defect

add_target dropped any directory not on disk at that instant and recorded nothing about it. An iCloud plug-in folder that had not been materialised was therefore skipped silently, while the script still printed its success banner and exited 0.

That is worse than a failed install: it looks completely successful, and OmniFocus keeps loading the stale copy from the folder that was missed. Observed directly on one machine — the same script left iCloud stale in one run and updated both locations in a later run, with no code change in between.

The fix

A location absent because the user does not use it is still skipped quietly. A location that is expected is now reported and fails the run:

  • iCloud counts as expected whenever the OmniFocus iCloud container directory exists — that container's presence means plug-in sync is in use, and OmniFocus prefers that copy.
  • An explicitly configured custom directory always counts as expected.
  • legacy stays best-effort, since its absence is the normal case.

Skipped locations are listed under their own heading, and a partial install exits 1 with guidance: open OmniFocus once so the folder materialises, then re-run. It also points at bridge-health-check, which since #201 reports every installed copy and warns when they disagree.

Verification

Both paths exercised on a real machine with iCloud plug-in sync enabled:

scenario output exit
iCloud plug-in folder moved aside (container still present) lists the skipped location, reports partial install 1
both locations present normal success banner 0

Validation

Impact: package per focusrelay-dev classify. Validation passes: 317 tests, clean release build, version consistency checks.

add_target dropped any directory that was not on disk at that instant and
recorded nothing, so an iCloud plug-in folder that had not been
materialised was skipped with no warning while the script still exited 0.
The install looked completely successful and OmniFocus kept loading the
stale copy from the folder that was missed -- observed on this machine,
where the same script left iCloud stale in one run and updated both
locations in the next with no code change between them.

A location absent because the user does not use it is still skipped
quietly. A location that is expected is now reported and fails the run:
iCloud counts as expected whenever the OmniFocus iCloud container exists,
which means plug-in sync is on, and an explicitly configured custom
directory always counts.

Partial installs exit 1 with guidance to open OmniFocus once so the folder
materialises, and point at bridge-health-check, which reports every
installed copy and warns when they disagree.

Verified both paths: with the iCloud plug-in folder moved aside the script
reports the skip and exits 1; with it present it exits 0 as before.

Validation impact: package.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@deverman
deverman merged commit 9122dbf into master Aug 2, 2026
4 checks passed
@deverman
deverman deleted the issue-200-installer-partial-detection branch August 2, 2026 17:23
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.

Installed plug-in is ignored when OmniFocus plug-in sync is enabled: README installs to the wrong directory

1 participant