File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change 4343 printf " ${GREEN} Added WP Debug post-start hooks in: ${BOLD}${CONFIG_FILE}${RESET} .\n"
4444fi
4545
46- LOG_DIR=$( dirname " $LOG_DIR_VALUE " )
46+ LOG_DIR=" $( dirname " $LOG_DIR_VALUE " ) "
4747
4848# Create log directory if it doesn't exist
49- if $LOG_DIR ; then
50- printf " ${BLUE} Creating log directory...${RESET} \n"
51- if [ -d $LOG_DIR ]; then
52- printf " ${YELLOW} The '/log ' directory already exists. Skipping creation.${RESET} \n"
49+ if [ -n " $LOG_DIR " ] ; then
50+ printf " ${BLUE} Creating $LOG_DIR directory...${RESET} \n"
51+ if [ -d " $LOG_DIR " ]; then
52+ printf " ${YELLOW} The '$LOG_DIR ' directory already exists. Skipping creation.${RESET} \n"
5353 else
54- mkdir $LOG_DIR ;
54+ mkdir -p " $LOG_DIR "
5555 # Print success message
56- printf " ${GREEN} New directory created at: ${BOLD} / ${LOG_DIR}${RESET} \n"
56+ printf " ${GREEN} New directory created at: ${BOLD}${LOG_DIR}${RESET} \n"
5757 fi
58+ else
59+ printf " ${RED} LOG_DIR_VALUE is not set. Skipping directory creation.${RESET} \n"
5860fi
61+
You can’t perform that action at this time.
0 commit comments