Skip to content

fix(cli): avoid xdg-open error on servers - #36875

Closed
tarcisiomiranda wants to merge 9 commits into
anomalyco:devfrom
tarcisiomiranda:suppress-browser-error
Closed

tarcisiomiranda wants to merge 9 commits into
anomalyco:devfrom
tarcisiomiranda:suppress-browser-error

Conversation

@tarcisiomiranda

@tarcisiomiranda tarcisiomiranda commented Jul 14, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #31815

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

opencode web shows an error on Linux servers when xdg-open is not installed.

This change checks if xdg-open exists before trying to open the browser. The server keeps running and the URL is still shown.

Before the fix:
image

After the fix:
image

How did you verify your code works?

  • Ran the new test
  • Ran the typecheck
  • Started the web server without xdg-open

Screenshots / recordings

Not needed.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@thdxr

thdxr commented Oct 10, 2026

Copy link
Copy Markdown
Member

This branch has been upgraded to V2. We're no longer taking PRs for V1. If you think this is still relevant, please port it over and open it for V2.

— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

@thdxr thdxr closed this Oct 10, 2026
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.

opencode web shows ENOENT: xdg-open error in container environments

2 participants