Skip to content

Commit

Permalink
Remove error message when exiting --stdin mode (#4368)
Browse files Browse the repository at this point in the history
fix #4361
1. Remove error message when input a empty string
2. Remove error message when read input from stream
2. Remove error message when interrupt by `CTRL-C`
  • Loading branch information
karajan1001 authored Aug 10, 2020
1 parent fef635c commit 4e5a814
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions dvc/command/check_ignore.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,11 @@ def _check_one_file(self, target):
def _interactive_mode(self):
ret = 1
while True:
target = ask("")
try:
target = ask("")
except (KeyboardInterrupt, EOFError):
break
if target == "":
logger.info(
"Empty string is not a valid pathspec. Please use . "
"instead if you meant to match all paths."
)
break
if not self._check_one_file(target):
ret = 0
Expand Down

0 comments on commit 4e5a814

Please sign in to comment.