Skip to content

"Error: spawn xdg-open ENOENT" when attempting to view plan inside a devcontainer #1038

@capi

Description

@capi

Describe the bug

I'm using copilot-cli in plan mode from inside a devcontainer, which has no desktop environment (mcr.microsoft.com/devcontainers/typescript-node:4-24-trixie)

Copilot offers to ctrl+y view/edit plan, which results in Error: spawn xdg-open ENOENT error.

Affected version

0.0.388 Commit: 89477e8

Steps to reproduce the behavior

  1. Start copilot inside a development container, e.g. mcr.microsoft.com/devcontainers/typescript-node:4-24-trixie
  2. Switch to plan mode
  3. Do some planing
  4. Press ctrl-y to view/edit plan

Expected behavior

The default editor is launched instead if xdg-open is not available, e.g. from EDITOR environment variable, and/or fallback to nano/vim if it's a Linux environment.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions