Skip to content

Errors with broken symlinks appears even if --no-messages is passed #241

@ahmedelgabri

Description

@ahmedelgabri

If you have a broken symlink somewhere in the path that you are searching in you will get this error No such file or directory (os error 2) on macOS. Not sure how this should be handled though, for example it seems the ag ignores these errors.

$ tree
.
├── bar
│   └── brokensymlink -> ./moveme
└── moveme.broken

1 directory, 2 files

$ rg --files --hidden --follow --glob "\!.git/*"
./bar/brokensymlink: No such file or directory (os error 2)
moveme.broken

The problem that if you try to use rg with another tool that depends on the output, something like fzf it will break or you get some weird stuff.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions