Created
April 25, 2023 04:46
-
-
Save BoeJaker/e5c5420f4e5ae0ee84270cd51f0b02ec to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| def create_dummy_env_file(env_path): | |
| dummy_env_path = env_path + ".dummy" | |
| with open(env_path, "r") as env_file, open(dummy_env_path, "w") as dummy_env_file: | |
| for line in env_file: | |
| if line.strip() == "": | |
| dummy_env_file.write("\n") | |
| else: | |
| key, value = line.strip().split("=") | |
| dummy_env_file.write(f"{key}=PLACEHOLDER_{key}\n") | |
| return dummy_env_path |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment