dotfiles/vscode/.vscode/extensions/donjayamanne.python-environment-manager-1.2.4/pythonFiles/printEnvVariablesToFile.py
Errol Sancaktar ff17c17e23 vscode
2024-06-14 09:31:58 -06:00

14 lines
320 B
Python

# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import os
import json
import sys
# Last argument is the target file into which we'll write the env variables as json.
json_file = sys.argv[-1]
with open(json_file, "w") as outfile:
json.dump(dict(os.environ), outfile)