1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 17:24:45 +00:00

refactor: simplify ui and log defaults

Remove support for obscure env var overrides in favor of sensible defaults.
This commit is contained in:
Tw93
2026-01-03 13:29:07 +08:00
parent 5955bd93dc
commit c165230159
3 changed files with 3 additions and 5 deletions

View File

@@ -38,7 +38,7 @@ rotate_log_once() {
[[ -n "${MOLE_LOG_ROTATED:-}" ]] && return 0
export MOLE_LOG_ROTATED=1
local max_size="${MOLE_MAX_LOG_SIZE:-$LOG_MAX_SIZE_DEFAULT}"
local max_size="$LOG_MAX_SIZE_DEFAULT"
if [[ -f "$LOG_FILE" ]] && [[ $(get_file_size "$LOG_FILE") -gt "$max_size" ]]; then
mv "$LOG_FILE" "${LOG_FILE}.old" 2> /dev/null || true
ensure_user_file "$LOG_FILE"

View File

@@ -321,7 +321,7 @@ stop_inline_spinner() {
with_spinner() {
local msg="$1"
shift || true
local timeout="${MOLE_CMD_TIMEOUT:-180}"
local timeout=180
start_inline_spinner "$msg"
local exit_code=0
if [[ -n "${MOLE_TIMEOUT_BIN:-}" ]]; then
@@ -333,7 +333,7 @@ with_spinner() {
# Get spinner characters
mo_spinner_chars() {
local chars="${MO_SPINNER_CHARS:-|/-\\}"
local chars="|/-\\"
[[ -z "$chars" ]] && chars="|/-\\"
printf "%s" "$chars"
}