Skip to content

[Skills] Fix bunx error on windows#27517

Merged
raycastbot merged 2 commits intoraycast:mainfrom
DaleSeo:skills-fix-windows-bunx-fallback
Apr 30, 2026
Merged

[Skills] Fix bunx error on windows#27517
raycastbot merged 2 commits intoraycast:mainfrom
DaleSeo:skills-fix-windows-bunx-fallback

Conversation

@DaleSeo
Copy link
Copy Markdown
Contributor

@DaleSeo DaleSeo commented Apr 29, 2026

Description

Fixes #27509.

The Skills extension is supposed to try bunx first and then silently switch to npx if Bun isn't installed. However, on Windows, the fallback never happened. The shell-escape helper wraps every argument in double quotes for cmd.exe, so when bunx is missing, the error shows up as '"bunx"' is not recognized as an internal or external command. But the resolution-failure matcher only checked for the unquoted version, which is 'bunx' is not recognized..., so the error went to the user instead of triggering the npx fallback. This change adds the cmd.exe-quoted version to the matcher, ensuring the fallback works as it should.

Screencast

Checklist

@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: skills Issues related to the skills extension platform: macOS platform: Windows OP is contributor The OP of the PR is a contributor of the extension labels Apr 29, 2026
@raycastbot
Copy link
Copy Markdown
Collaborator

raycastbot commented Apr 29, 2026

Thank you for your contribution! 🎉

🔔 @keito4 @raulgg @pernielsentikaer @kayotimoteo you might want to have a look.

You can use this guide to learn how to check out the Pull Request locally in order to test it.

📋 Quick checkout commands
BRANCH="skills-fix-windows-bunx-fallback"
FORK_URL="https://github.com/DaleSeo/extensions.git"
EXTENSION_NAME="skills"
REPO_NAME="extensions"

git clone -n --depth=1 --filter=tree:0 -b $BRANCH $FORK_URL
cd $REPO_NAME
git sparse-checkout set --no-cone "extensions/$EXTENSION_NAME"
git checkout
cd "extensions/$EXTENSION_NAME"
npm install && npm run dev

We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 10-15 business days.

@DaleSeo DaleSeo marked this pull request as ready for review April 29, 2026 13:03
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 29, 2026

Greptile Summary

This PR fixes the bunxnpx fallback on Windows by adding a second error-string matcher (windowsCommandNotFoundQuoted) that matches the double-quote-wrapped form cmd.exe emits when the shell-escape helper quotes the command name. The fix is applied consistently in both branches of isNpxCommandResolutionFailure and is correct.

Confidence Score: 5/5

Safe to merge; only issue is a minor changelog date convention.

The logic change is small, targeted, and correct. The only finding is a P2 style nit about using a hardcoded date in CHANGELOG.md instead of {PR_MERGE_DATE}.

extensions/skills/CHANGELOG.md — needs {PR_MERGE_DATE} placeholder.

Important Files Changed

Filename Overview
extensions/skills/src/utils/skills-cli.ts Adds windowsCommandNotFoundQuoted matcher to isNpxCommandResolutionFailure so the double-quote-wrapped form emitted by cmd.exe triggers the npx fallback; logic is correct and applied consistently in both places.
extensions/skills/CHANGELOG.md New entry added at the top, but uses a hardcoded date (2026-04-30) instead of the required {PR_MERGE_DATE} placeholder.
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
extensions/skills/CHANGELOG.md:3
**Use `{PR_MERGE_DATE}` placeholder instead of a hardcoded date**

The Raycast changelog convention requires using `{PR_MERGE_DATE}` for the top (unreleased) entry so the merge date is substituted automatically. Using a literal date like `2026-04-30` bypasses that mechanism and may be wrong if the PR merges on a different day.

```suggestion
## [Fix Windows bunx Fallback] - {PR_MERGE_DATE}
```

Reviews (2): Last reviewed commit: "Update CHANGELOG.md" | Re-trigger Greptile

Copy link
Copy Markdown
Contributor

@raulgg raulgg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thank you for the fix!

@raycast-extensions-bot raycast-extensions-bot Bot added the Approved Approved by a user label Apr 29, 2026
@raulgg
Copy link
Copy Markdown
Contributor

raulgg commented Apr 29, 2026

Thank you for the fix @DaleSeo!

I just realized now about the change to include bunx as a package runner in the extension. I just resolved, I hope, an issue I was having with GitHub not notifying me properly because I missed the PR that I was reviewing now, and I would have loved to leave some feedback there.

Not to be tackled in this PR, but here are some thoughts: #27445 stated that bunx would be used if npx was unavailable, but that is not the case. The fallback chain is: custom npx path => bunx => npx. In my opinion, we should not force bunx as the primary package runner and should always use npx first. However, we can add a preference to the extension to prioritize bunx, in which case we could reverse the fallback chain.

Additionally, the errors now can feel like they push bunx even for users with npx. I can tackle that; I already started working on fixing error message instructions for Windows, so they don't feel too macOS specific.

Regardless, that's unrelated to the current fix, which I already approved. I just wanted to engage in some discussion over those concerns.

@DaleSeo DaleSeo mentioned this pull request Apr 29, 2026
@DaleSeo
Copy link
Copy Markdown
Contributor Author

DaleSeo commented Apr 29, 2026

@raulgg Thanks for sharing your thoughts. One thing worth flagging on reversing the fallback chain is that most users who have bunx also have npx installed because Bun users typically keep Node around too, so using npx first would mean bunx is essentially never reached in practice. That makes the preference toggle you mentioned seem like the real solution to me.

@0xdhrv 0xdhrv self-assigned this Apr 30, 2026
Copy link
Copy Markdown
Contributor

@0xdhrv 0xdhrv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, approved ✅

@raycastbot raycastbot merged commit ae91d08 into raycast:main Apr 30, 2026
2 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

Published to the Raycast Store:
https://raycast.com/keito4/skills

@raycastbot
Copy link
Copy Markdown
Collaborator

🎉 🎉 🎉

We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Approved Approved by a user extension fix / improvement Label for PRs with extension's fix improvements extension: skills Issues related to the skills extension OP is contributor The OP of the PR is a contributor of the extension platform: macOS platform: Windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Skills]...

4 participants