Skip to content

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

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

fix(cli): avoid xdg-open error on servers#36875
tarcisiomiranda wants to merge 6 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

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

1 participant