Skip to content

Commit

Permalink
fix: added maxsplit=1 to split method to handle base64 values
Browse files Browse the repository at this point in the history
fix: added maxsplit=1 to split method to handle base64 values
  • Loading branch information
brivu authored Jun 27, 2022
2 parents c2bedd2 + 5398335 commit f940498
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions src/scripts/get-prev-task.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,10 @@ cat <<< "$ECS_SCRIPT_UPDATE_CONTAINER_DEFS" > "$UPDATE_CONTAINER_DEFS_SCRIPT_FIL
# Prepare container definitions
CONTAINER_DEFS=$(python "$UPDATE_CONTAINER_DEFS_SCRIPT_FILE" "$PREVIOUS_TASK_DEFINITION" "$ECS_PARAM_CONTAINER_IMAGE_NAME_UPDATES" "$ECS_PARAM_CONTAINER_ENV_VAR_UPDATES")


# Escape single quotes from environment variables for BASH_ENV

CLEANED_CONTAINER_DEFS=$(echo "$CONTAINER_DEFS" | sed -E "s:':'\\\'':g")


# Prepare script for getting task definition values

GET_TASK_DFN_VAL_SCRIPT_FILE=$(mktemp _get_task_def_value.py.XXXXXX)
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/update_container_defs.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def run(previous_task_definition, container_image_name_updates,
container_name = kv[1].strip()
env_var_name_kv = env_kv_pairs[index+1].split('=')
env_var_name = env_var_name_kv[1].strip()
env_var_value_kv = env_kv_pairs[index+2].split('=')
env_var_value_kv = env_kv_pairs[index+2].split('=', maxsplit=1)
env_var_value = env_var_value_kv[1].strip()
if env_var_name_kv[0].strip() != 'name' or env_var_value_kv[0].strip() != 'value':
raise ValueError(
Expand Down

0 comments on commit f940498

Please sign in to comment.