fix(installer): treat "No such file or directory" as an empty developer slot#51
Merged
Conversation
…er slot Deleting or replacing an already-empty developer slot on older Roku devices (e.g. Roku Stick 3500X) returns "Delete Failed: No such file or directory" rather than "no plugin installed". isEmptyDeveloperSlotMessage only matched the latter, so deleteInstalledChannel failed on an empty slot and a Replace install would not fall back to a fresh Install. Recognize both phrasings as an empty slot, making delete idempotent and the install Replace->Install fallback work on older devices. Adds unit coverage for the empty-slot phrasings and the delete-success classifier. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR improves Roku developer-installer message classification so that older-device responses for deleting/replacing an already-empty developer slot are treated as an “empty slot” condition. This makes delete idempotent on empty slots and allows Replace→Install fallback to trigger reliably.
Changes:
- Extend
isEmptyDeveloperSlotMessageto also recognize the older"No such file or directory"empty-slot phrasing. - Add focused unit tests covering both empty-slot phrasings and delete-success classification.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/installer-message.ts |
Broadens empty developer-slot detection to include older-device wording, affecting delete idempotency and Replace→Install fallback behavior. |
test/installer-message.test.ts |
Adds regression coverage for the expanded empty-slot classifier and for delete-success classification (including "Delete Succeeded."). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
putio-release-bot Bot
added a commit
that referenced
this pull request
Jul 24, 2026
## [2.4.2](v2.4.1...v2.4.2) (2026-07-24) ### Bug Fixes * **installer:** treat "No such file or directory" as an empty developer slot ([#51](#51)) ([3e060e8](3e060e8))
Contributor
|
🎉 This PR is included in version 2.4.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On older Roku devices (e.g. Roku Stick 3500X), deleting or replacing an already-empty developer slot returns:
isEmptyDeveloperSlotMessageonly matched"no plugin installed"(the newer-device phrasing), so:deleteInstalledChannelfailed on an empty slot instead of succeeding idempotently, andinstallPackageEffect's Replace→Install fallback (which keys offisEmptyDeveloperSlotMessage) didn't trigger.Surfaced downstream in putdotio/putio-roku (2.4.1 fixed the "Delete Succeeded" case in #50; this is the remaining empty-slot edge —
pnpm sideloadonto an empty slot still errored).Fix
Recognize both empty-slot phrasings:
Both call sites benefit: delete becomes idempotent on an empty slot, and a Replace install falls back to a fresh Install.
"No such file or directory"is only reached in the installer delete/replace path, where it unambiguously means "no dev package present."Verification
test/installer-message.test.tscovers both empty-slot phrasings and the delete-success classifier (incl. a regression check on"Delete Succeeded.").pnpm verifygreen (vp check+tsc --noEmit+vp run test+npm pack --dry-run).🤖 Generated with Claude Code