V9.14.022.2026.06.11: enforce secret and cleanup safeguards
This commit is contained in:
@@ -23,36 +23,22 @@ guard_sourcing || return "${ERR_GUARD_SRCE}"
|
||||
# 0: on success
|
||||
#######################################
|
||||
lb_config_start() {
|
||||
declare canonical_build_dir=""
|
||||
|
||||
printf "\e[95m🧪 %s starting ... \e[0m\n" "${BASH_SOURCE[0]}"
|
||||
|
||||
if [[ ! -d ${VAR_HANDLER_BUILD_DIR} ]]; then
|
||||
|
||||
mkdir -p "${VAR_HANDLER_BUILD_DIR}"
|
||||
# shellcheck disable=SC2164
|
||||
cd "${VAR_HANDLER_BUILD_DIR}"
|
||||
printf "\e[92m✅ '%s' created. \e[0m\n" "${VAR_HANDLER_BUILD_DIR}"
|
||||
|
||||
else
|
||||
|
||||
# shellcheck disable=SC2164
|
||||
cd "${VAR_HANDLER_BUILD_DIR}"
|
||||
|
||||
fi
|
||||
initialize_build_directory "${VAR_HANDLER_BUILD_DIR}" canonical_build_dir || return "${ERR_BUILD_PATH}"
|
||||
VAR_HANDLER_BUILD_DIR="${canonical_build_dir}"
|
||||
cd "${VAR_HANDLER_BUILD_DIR}" || return "${ERR_BUILD_PATH}"
|
||||
|
||||
if [[ -d "${VAR_HANDLER_BUILD_DIR}/.build" ]]; then
|
||||
|
||||
# shellcheck disable=SC2164
|
||||
cd "${VAR_HANDLER_BUILD_DIR}"
|
||||
validate_build_directory_marker "${VAR_HANDLER_BUILD_DIR}" || return "${ERR_BUILD_PATH}"
|
||||
|
||||
printf "\e[95m🧪 Deleting former config, binary and cache ... \e[0m\n"
|
||||
|
||||
lb clean --binary --cache --purge --source
|
||||
|
||||
if [[ "${PWD}" == "${VAR_HANDLER_BUILD_DIR}" && "${PWD}" != "/" && -n "${PWD}" ]]; then
|
||||
|
||||
rm -rf -- ./* ./.??*
|
||||
|
||||
fi
|
||||
clean_build_directory_contents "${VAR_HANDLER_BUILD_DIR}" || return "${ERR_BUILD_PATH}"
|
||||
|
||||
printf "\e[92m✅ Deleting former config, binary and cache done.\e[0m\n"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user