dotfiles/vscode/.vscode/extensions/ms-python.python-2024.12.1-linux-x64/python_files/printEnvVariablesToFile.py
2024-08-02 10:42:24 -06:00

13 lines
371 B
Python

# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import os
import sys
# Last argument is the target file into which we'll write the env variables line by line.
output_file = sys.argv[-1]
with open(output_file, "w") as outfile: # noqa: PTH123
for key, val in os.environ.items():
outfile.write(f"{key}={val}\n")