Skip to content

Commit

Permalink
Make subprocess inherit environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
TomaSajt committed Jan 28, 2024
1 parent 892fc27 commit 9c37d64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def merge(in_file, out_file, option, po_dir="po"):
"""
if not os.path.exists(out_file) and os.path.exists(in_file):
cmd = ["msgfmt", option, "--template", in_file, "-d", po_dir, "-o", out_file]
if subprocess.call(cmd, env={"GETTEXTDATADIR": po_dir}) != 0:
if subprocess.call(cmd, env={**os.environ, "GETTEXTDATADIR": po_dir}) != 0:
msg = "ERROR: %s was not merged into the translation files!\n" % out_file
raise SystemExit(msg)
_LOG.info("Compiling %s >> %s", in_file, out_file)
Expand Down

0 comments on commit 9c37d64

Please sign in to comment.