Repository navigation
fix(wsl): restore snoreToast +x so toasts work after a fresh install - #152
Merged
Merged
Conversation
…e, fix changelog Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 WSL, a fresh install of the plugin never shows Windows toast notifications. The
bundled
node-notifiersnoretoast-x64.exeis published at0644; WSL still requiresthe Unix execute bit to launch a Windows binary, so the spawn fails with
EACCES.WindowsToasterswallows that error (it only forwards errno-1) and the pluginignores the callback error, so nothing is logged and no toast appears. Users have to
discover node-notifier's README note and run
chmod +xafter every install or update.Fixes #151
Change
src/snoretoast.ts: resolve node-notifier throughcreateRequire(import.meta.url).resolve("node-notifier"), pick thex64/x86binary the same way node-notifier does, and restore
0755when the execute bit ismissing.
src/notify.tswhenisWslis true, before constructingWindowsToaster. The change is gated to WSL: native Windows ignores the Unix modeand Linux/macOS never use this binary.
only under
OPENCODE_NOTIFIER_DEBUG=1.OpenCode version and platforms
Affects OpenCode 1 and 2, because both load the same
src/notify.ts.Tested on:
v2.3.0, plugin 1.1.2.
Evidence
Unit tests and checks:
Clean-environment check with the packed build (fresh directory, no plugin installed):
snoretoast-x64.exenpm installof the patched tarball0644Permission denied(126)0755-help)0755, no repair logged0644, load again (cache refresh)0755, repair loggedControl: the published
1.1.2build stays at0644after loading, and launching itstill fails with
Permission denied(126).Drafted with DeepSeek V4.1 Flash 1017 in OpenCode.