mirror of
https://github.com/tw93/Mole.git
synced 2026-02-11 17:03:59 +00:00
refactor: simplify configuration by removing unused environment variables
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
# Clean Homebrew caches and remove orphaned dependencies
|
||||
# Env: MO_BREW_TIMEOUT, DRY_RUN
|
||||
# Env: DRY_RUN
|
||||
# Skips if run within 7 days, runs cleanup/autoremove in parallel with 120s timeout
|
||||
clean_homebrew() {
|
||||
command -v brew > /dev/null 2>&1 || return 0
|
||||
@@ -44,7 +44,7 @@ clean_homebrew() {
|
||||
fi
|
||||
fi
|
||||
# Run cleanup/autoremove in parallel with timeout guard per command.
|
||||
local timeout_seconds=${MO_BREW_TIMEOUT:-120}
|
||||
local timeout_seconds=120
|
||||
local brew_tmp_file autoremove_tmp_file
|
||||
local brew_pid autoremove_pid
|
||||
local brew_exit=0
|
||||
|
||||
@@ -292,8 +292,8 @@ is_protected_purge_artifact() {
|
||||
scan_purge_targets() {
|
||||
local search_path="$1"
|
||||
local output_file="$2"
|
||||
local min_depth="${MOLE_PURGE_MIN_DEPTH:-$PURGE_MIN_DEPTH_DEFAULT}"
|
||||
local max_depth="${MOLE_PURGE_MAX_DEPTH:-$PURGE_MAX_DEPTH_DEFAULT}"
|
||||
local min_depth="$PURGE_MIN_DEPTH_DEFAULT"
|
||||
local max_depth="$PURGE_MAX_DEPTH_DEFAULT"
|
||||
if [[ ! "$min_depth" =~ ^[0-9]+$ ]]; then
|
||||
min_depth="$PURGE_MIN_DEPTH_DEFAULT"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user