mirror of
https://github.com/tw93/Mole.git
synced 2026-02-04 15:39:42 +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:
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
@@ -247,8 +247,6 @@ rm -f "$HOME/.cache/mole/brew_last_cleanup"
|
||||
"$@"
|
||||
}
|
||||
|
||||
MO_BREW_TIMEOUT=2
|
||||
|
||||
brew() {
|
||||
case "$1" in
|
||||
cleanup)
|
||||
|
||||
Reference in New Issue
Block a user