Skip to content

Commit

Permalink
[FIX] Don't use bootstrap to create the .env-secret file
Browse files Browse the repository at this point in the history
  • Loading branch information
ddejong-therp committed Sep 24, 2024
1 parent 3e84fda commit 6619e18
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions bin/migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def disable_dangerous_stuff():
]
dbname = os.environ["PGDATABASE"]

with psycopg.connect("dbname=" + os.environ["PGDATABASE"]) as conn:
with psycopg.connect("dbname=" + dbname) as conn:
with conn.cursor() as cur:
for query, required in queries:
try:
Expand Down Expand Up @@ -646,9 +646,8 @@ def write_env_secret(build_dir, version):
rewritten_lines = []

lines = []
if not os.path.exists(os.path.join(build_dir, ".env-secret")):
cmd_system(os.path.join(build_dir, "bootstrap"))
with open(os.path.join(build_dir, ".env-secret"), "r") as file:
env_secret_template = os.path.join(build_dir, "waftlib/templates/.env-secret")
with open(env_secret_template, "r") as file:
# Go over all lines and see what needs to be rewritten
for line in file:
i = line.find("=")
Expand Down

0 comments on commit 6619e18

Please sign in to comment.