1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-12 12:51:18 +00:00

feat: improve version detection and error handling

- Add fallback to mo --version when brew list fails
- Add error handling for debug log write failures
- Improve version extraction with multiple fallback strategies
This commit is contained in:
Tw93
2026-01-23 22:25:35 +08:00
parent a27caab2b6
commit a4f1f49fab
3 changed files with 12 additions and 2 deletions

View File

@@ -180,7 +180,9 @@ log_system_info() {
# Reset debug log file for this new session
ensure_user_file "$DEBUG_LOG_FILE"
: > "$DEBUG_LOG_FILE"
if ! : > "$DEBUG_LOG_FILE" 2> /dev/null; then
echo -e "${YELLOW}${ICON_WARNING}${NC} Debug log not writable: $DEBUG_LOG_FILE" >&2
fi
# Start block in debug log file
{