Skip to content

Global .gooseignore negation pattern not working #6155

@leocavalcante

Description

@leocavalcante

Description

When trying to access a .env.example file in a project, Goose blocks access with the error:

Access to '/path/to/project/.env.example' is restricted by .gooseignore

Environment

  • Local .gooseignore: Does not exist in the project directory
  • Global .gooseignore at ~/.config/goose/.gooseignore contains:
    !.env.example
    

Expected Behavior

The ! prefix should negate the pattern and explicitly allow access to .env.example files, following the standard gitignore-style negation syntax.

Actual Behavior

Goose still blocks access to .env.example files despite the negation pattern in the global .gooseignore.

Possible Causes

  1. The negation pattern (!) isn't being parsed correctly
  2. There's a default internal rule blocking .env* files that the negation isn't overriding
  3. The global .gooseignore file isn't being read/applied properly

Steps to Reproduce

  1. Create a global .gooseignore at ~/.config/goose/.gooseignore with content !.env.example
  2. Ensure no local .gooseignore exists in the project
  3. Try to view or edit a .env.example file using Goose
  4. Observe the access restriction error

Metadata

Metadata

Assignees

Labels

mcpMCP/Extension relatedp2Priority 2 - Medium

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions