Skip to content

Commit 01719e4

Browse files
committed
Send al VPC CNI logs to /dev/null by default (#2443)
1 parent dbb2f7f commit 01719e4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

python/client/cortex/binary/__init__.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ def run():
2525
Runs the CLI from terminal.
2626
"""
2727
try:
28-
process = subprocess.run([get_cli_path()] + sys.argv[1:], cwd=os.getcwd())
28+
env = os.environ.copy()
29+
if "AWS_VPC_K8S_CNI_LOG_FILE" not in env:
30+
env["AWS_VPC_K8S_CNI_LOG_FILE"] = "/dev/null"
31+
process = subprocess.run([get_cli_path()] + sys.argv[1:], cwd=os.getcwd(), env=env)
2932
except KeyboardInterrupt:
3033
sys.exit(130) # Ctrl + C
3134
sys.exit(process.returncode)
@@ -51,6 +54,8 @@ def run_cli(
5154

5255
env = os.environ.copy()
5356
env["CORTEX_CLI_INVOKER"] = "python"
57+
if "AWS_VPC_K8S_CNI_LOG_FILE" not in env:
58+
env["AWS_VPC_K8S_CNI_LOG_FILE"] = "/dev/null"
5459
process = subprocess.Popen(
5560
[get_cli_path()] + args,
5661
stderr=subprocess.PIPE,

0 commit comments

Comments
 (0)