Skip to content

Commit

Permalink
Sanitize PRODUCT when checking license (#359)
Browse files Browse the repository at this point in the history
  • Loading branch information
bianchi2 authored Jan 4, 2024
1 parent cd13272 commit c8beba3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ pre_flight_checks() {

if [ "${SKIP_LICENSE_TEST_FLAG}" == "" ]; then
for PRODUCT in ${PRODUCTS_ARRAY[@]}; do
# when config.tfvars has been edited in Windows, it may contain carriage returns `\r`
# which breaks the below code, so let's sanitize PRODUCT variable
PRODUCT=$(echo ${PRODUCT} | sed 's/\r$//')
log "Checking ${PRODUCT} license"
LICENSE_ENV_VAR=${PRODUCT}'_license'
LICENSE_TEXT=$(get_variable ${LICENSE_ENV_VAR} "${CONFIG_ABS_PATH}")
Expand Down

0 comments on commit c8beba3

Please sign in to comment.