Skip to content

Commit

Permalink
fix: wrong regex in dup multi-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Tardo committed Jun 6, 2022
1 parent d51982a commit 49e7bd6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/dup
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,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"^DEST_\d+_(\w+)$", target_env_raw_name)[0]
target_env_name = re.findall(r"^DST_\d+_(\w+)$", target_env_raw_name)[0]
os.putenv(target_env_name, env_value)

# Expand shell commands from environment options
Expand Down Expand Up @@ -59,7 +59,7 @@ def _unset_env(index):
filter(lambda x: x.startswith(f"DST_{index}_"), os.environ.keys())
)
for target_env_raw_name in target_environ_raw_names:
target_env_name = re.findall(r"^DEST_\d+_(\w+)$", target_env_raw_name)[0]
target_env_name = re.findall(r"^DST_\d+_(\w+)$", target_env_raw_name)[0]
os.unsetenv(target_env_name)


Expand Down

0 comments on commit 49e7bd6

Please sign in to comment.