Skip to content

Commit

Permalink
warn if internal logs will fail to write
Browse files Browse the repository at this point in the history
  • Loading branch information
ChillerDragon committed Feb 16, 2025
1 parent daa00aa commit 9a0e559
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions lib/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,23 @@ function check_warnings() {
)
fi
fi
if [ "$CFG_POST_LOGS_DIR" != "" ]
then
if [ -f "$CFG_POST_LOGS_DIR" ]
then
wrn "WARNING: post_logs_dir is set to: $CFG_POST_LOGS_DIR"
wrn " but it is a FILE not a DIRECTORY"
wrn " logging will not work!"
elif [ ! -d "$CFG_POST_LOGS_DIR" ]
then
wrn "WARNING: post_logs_dir is set to: $CFG_POST_LOGS_DIR"
wrn " but that directory does not exist!"
wrn " logging will not work. Please create the directory"
wrn ""
wrn " mkdir -p $CFG_POST_LOGS_DIR"
wrn ""
fi
fi
}

function install_cstd() {
Expand Down

0 comments on commit 9a0e559

Please sign in to comment.