Skip to content

Commit 40d4b9b

Browse files
committed
Fix basescript logging file permission
1 parent 13f71c2 commit 40d4b9b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

log/log.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ log()
6565
LOCAL_RUN_WITH_SUDO="" # Set to empty!
6666

6767
# Check if file exist and users permissions
68-
if [[ -f ${LOCAL_LOG_FULL_PATH} && ! -w ${LOCAL_LOG_FULL_PATH} ]] || [[ -d ${LOCAL_LOG_BASE_PATH} && ! -w ${LOCAL_LOG_BASE_PATH} ]]; then
68+
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
6969
if [[ ! $(declare -F echoerror) == "" ]]; then
7070
BASESCRIPT_LOG_ALL_ACTIONS=false
7171
echoerror "You dont have permission to write log at '${LOCAL_LOG_FULL_PATH}' - [${FUNCNAME[0]}]" "${LOCAL_STOP_EXECUTION_ON_ERROR}"

0 commit comments

Comments
 (0)