Skip to content

Do not hang when using -p, a non-interactive environment, and when hitting a path permission error #550

@williammartin

Description

@williammartin

Description

When using -p, on a path permission error e.g.:

copilot -p "Create a directory /non-existent-root-dir"

the CLI tries to request permission:

➜ copilot -p "Create a directory /non-existent-root-dir"

I'll create the directory /non-existent-root-dir for you.


The following paths are outside the allowed directories:
  - /non-existent-root-dir

Allow access to these paths? (y/n):

This is particularly broken because the CLI doesn't properly detect whether there is a user to respond to an interactive prompt (e.g. TTY~ish):

The following paths are outside the allowed directories:
  - /dev/null || git diff --stat HEAD~1

Error: The action 'Execute GitHub Copilot CLI' has timed out after 60 minutes.

After discussion internally, we think it's altogether wrong that interactive prompting was ever added to -p mode, which is intended to be truly non-interactive. This better aligns with other tools in the same space as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions