Skip to content

Commit

Permalink
Update installUpgradeFunctions.sh: Create file if needed
Browse files Browse the repository at this point in the history
If the installation log file doesn't exist and we try to write to it, we'll get an error.
  • Loading branch information
EricClaeys authored Dec 8, 2024
1 parent 845d4ae commit 51791e4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/installUpgradeFunctions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@ function display_msg()
# ${DISPLAY_MSG_LOG} <should> be set if ${LOG_IT} is true, but just in case, check.

[[ ${LOG_IT} == "false" || -z ${DISPLAY_MSG_LOG} ]] && return
if [[ ! -f ${DISPLAY_MSG_LOG} ]]; then
mkdir -p "$( dirname "${DISPLAY_MSG_LOG}" )"
touch "${DISPLAY_MSG_LOG}"
fi

# Strip out all color escape sequences before adding to log file.
# The message may have an actual escape character or may have the
Expand Down

0 comments on commit 51791e4

Please sign in to comment.