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 c056a08 commit 52ec0cdCopy full SHA for 52ec0cd
Lib/json/tool.py
@@ -72,6 +72,11 @@ def main():
72
help='suppress all whitespace separation (most compact)')
73
options = parser.parse_args()
74
75
+ # Check if reading from stdin in a terminal without piped input
76
+ if options.infile == '-' and sys.stdin.isatty():
77
+ parser.print_help()
78
+ return
79
+
80
dump_args = {
81
'sort_keys': options.sort_keys,
82
'indent': options.indent,
0 commit comments