Skip to content

Commit

Permalink
Merge pull request #502 from ForgeFlow/fix-multi-set-env
Browse files Browse the repository at this point in the history
[FIX] Use os.environ instead of os.putenv to set environment variables
  • Loading branch information
pedrobaeza authored Mar 8, 2023
2 parents 3565426 + a009db7 commit 258ff02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/dup
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def _set_env(index):
for target_env_raw_name in target_environ_raw_names:
env_value = os.getenv(target_env_raw_name)
target_env_name = re.findall(r"^DST_\d+_(\w+)$", target_env_raw_name)[0]
os.putenv(target_env_name, env_value)
os.environ[target_env_name] = env_value

# Expand shell commands from environment options
# this resolves environment variables used in the string
Expand Down

0 comments on commit 258ff02

Please sign in to comment.