Skip to content

check-ignore: exit --stdin silently on empty string [qa] #4361

@jorgeorpinel

Description

@jorgeorpinel

Extracted from #4323 (comment)

When you use check-ignore in interactive mode, empty strings produce an error and exit. However empty strings are accepted (never match) without --stdin:

λ cat .dvcignore
*

λ dvc check-ignore --stdin
 anything
anything
 # <- just hit Enter
Empty string is not a valid pathspec. Please use . instead if you meant to match all paths.

λ dvc check-ignore -dn ''
::

So I propose that a) empty strings in --stdin interactive mode simply cause the tool to exit back to the shell prompt and/or b) empty strings sent as targets should just be ignored? (exit tool silently)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementEnhances DVCuiuser interface / interaction

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions