We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 26c2ffe commit e1f9ce2Copy full SHA for e1f9ce2
shelloracle/shelloracle.py
@@ -28,9 +28,7 @@ def get_query_from_pipe() -> str | None:
28
:raises ValueError: If the input is more than one line
29
:return: The query from the stdin pipe
30
"""
31
- if os.isatty(0): # Return 'None' if fd 0 is a tty (no pipe)
32
- return None
33
- if not (lines := sys.stdin.readlines()):
+ if os.isatty(0) or not (lines := sys.stdin.readlines()): # Return 'None' if fd 0 is a tty (no pipe)
34
return None
35
if len(lines) > 1:
36
raise ValueError("Multi-line input not supported")
0 commit comments