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 38c8649 commit 8276be4Copy full SHA for 8276be4
scripts/build-splunkrc.py
@@ -85,7 +85,7 @@ def parse_hostport(host_port):
85
def run(variable, splunkrc_path=None):
86
# read JSON from input
87
# parse the JSON
88
- input_config = build_config(variable)
+ input_config = build_config(variable) if variable else DEFAULT_CONFIG
89
90
config = {**DEFAULT_CONFIG, **input_config}
91
@@ -104,5 +104,9 @@ def run(variable, splunkrc_path=None):
104
with open(splunkrc_path, 'w') as f:
105
f.write(splunkrc_string)
106
107
-DATA = sys.stdin.read()
+if sys.stdin.isatty():
108
+ DATA = None
109
+else:
110
+ DATA = sys.stdin.read()
111
+
112
run(DATA, sys.argv[1] if len(sys.argv) > 1 else None)
0 commit comments