Remove error message when exiting --stdin mode (#4368)

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`
This commit is contained in:
karajan1001
2020-08-10 11:33:56 +03:00
committed by GitHub
parent fef635c6f0
commit 4e5a81402d
+4 -5
View File
@@ -38,12 +38,11 @@ class CmdCheckIgnore(CmdBase):
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