Skip to content

--files is listing files that won't be searched into  #2820

@fabiospampinato

Description

@fabiospampinato

Please tick this box to confirm you have reviewed the above.

  • I have a different issue.

What version of ripgrep are you using?

13.0.0

How did you install ripgrep?

brew install ripgrep

What operating system are you using ripgrep on?

macOS 12.5.1

Describe your bug.

The description for the "--files" flag says that it will list files that would be searched into, but if I execute something like this: rg '.' node_modules --files | sort I see top-level files listed also, like ./tsconfig.json, which won't actually be searched into, as if I remove the --files flag I don't see any matches from those top-level files.

What are the steps to reproduce the behavior?

Run rg . [PATH] --files, inside a directory containing some top-level files.

What is the actual behavior?

I see some files listed that exist outside of the root search path I specified.

What is the expected behavior?

I shouldn't see any files listed that exist outside of the root search path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidAn issue that is not actually a bug or a feature that already exists.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions