Skip to content

Use Bun.which to locate opencode command#2414

Closed
ScriptedAlchemy wants to merge 1 commit into
anomalyco:devfrom
ScriptedAlchemy:patch-1
Closed

Use Bun.which to locate opencode command#2414
ScriptedAlchemy wants to merge 1 commit into
anomalyco:devfrom
ScriptedAlchemy:patch-1

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Contributor

This pull request makes a targeted improvement to the createOpencodeServer function by ensuring that the opencode executable is located using Bun's which utility, rather than relying on the system path. This change increases reliability when spawning the server process.

  • Improved process spawning:
    • Updated the spawn call in server.ts to use Bun.which('opencode') for locating the opencode executable, ensuring the correct binary is used.

Reasoning

Currently i have never been able to successfully use createOpencodeServer without forking the file over and performing some modification. Bun.which should solve this by giving an absolute path to the opencode binary

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