Skip to content

Commit

Permalink
Fix basescript logging file permission
Browse files Browse the repository at this point in the history
  • Loading branch information
evertramos committed Nov 27, 2022
1 parent 13f71c2 commit 40d4b9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion log/log.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ log()
LOCAL_RUN_WITH_SUDO="" # Set to empty!

# Check if file exist and users permissions
if [[ -f ${LOCAL_LOG_FULL_PATH} && ! -w ${LOCAL_LOG_FULL_PATH} ]] || [[ -d ${LOCAL_LOG_BASE_PATH} && ! -w ${LOCAL_LOG_BASE_PATH} ]]; then
if [[ -f ${LOCAL_LOG_FULL_PATH} && ! -w ${LOCAL_LOG_FULL_PATH} ]] || [[ ! -f ${LOCAL_LOG_FULL_PATH} && -d ${LOCAL_LOG_BASE_PATH} && ! -w ${LOCAL_LOG_BASE_PATH} ]]; then
if [[ ! $(declare -F echoerror) == "" ]]; then
BASESCRIPT_LOG_ALL_ACTIONS=false
echoerror "You dont have permission to write log at '${LOCAL_LOG_FULL_PATH}' - [${FUNCNAME[0]}]" "${LOCAL_STOP_EXECUTION_ON_ERROR}"
Expand Down

0 comments on commit 40d4b9b

Please sign in to comment.