From c7fcf47ebdc3ef64a8cb47e63c1167885baba019 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 00:11:53 +0000 Subject: [PATCH 1/2] Aggiornamento: log degli errori su riapertura e quarantena (#17) Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01AVhvvMwmLpavNx3NvfycS9 --- CalenTask/Services/UpdateService.swift | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/CalenTask/Services/UpdateService.swift b/CalenTask/Services/UpdateService.swift index 8799610..d6c409d 100644 --- a/CalenTask/Services/UpdateService.swift +++ b/CalenTask/Services/UpdateService.swift @@ -402,7 +402,12 @@ nonisolated enum UpdateInstaller { let staged = appURL.deletingLastPathComponent() .appendingPathComponent(".CalenTask-update-\(UUID().uuidString).app") _ = try run("/usr/bin/ditto", [newApp.path, staged.path]) - _ = try? run("/usr/bin/xattr", ["-dr", "com.apple.quarantine", staged.path]) + do { + _ = try run("/usr/bin/xattr", ["-dr", "com.apple.quarantine", staged.path]) + } catch { + // Non bloccante: l'app resta installabile, ma Gatekeeper può chiedere conferma. + Log.app.error("Rimozione quarantena non riuscita: \(error.localizedDescription, privacy: .public)") + } do { _ = try FileManager.default.replaceItemAt(appURL, withItemAt: staged) } catch { @@ -416,7 +421,11 @@ nonisolated enum UpdateInstaller { let process = Process() process.executableURL = URL(fileURLWithPath: "/bin/sh") process.arguments = ["-c", "sleep 1; /usr/bin/open \"$0\"", appURL.path] - try? process.run() + do { + try process.run() + } catch { + Log.app.error("Riapertura dopo l'aggiornamento non riuscita: \(error.localizedDescription, privacy: .public)") + } } private static func attach(_ dmg: URL) throws -> URL { From 4dc0a01e3f868d2ca49421391bcd7bb69b447af0 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 00:14:24 +0000 Subject: [PATCH 2/2] UpdateService: import os per il logging (#17) Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01AVhvvMwmLpavNx3NvfycS9 --- CalenTask/Services/UpdateService.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/CalenTask/Services/UpdateService.swift b/CalenTask/Services/UpdateService.swift index d6c409d..32f8fd7 100644 --- a/CalenTask/Services/UpdateService.swift +++ b/CalenTask/Services/UpdateService.swift @@ -1,5 +1,6 @@ import Foundation import Observation +import os import Security #if os(macOS) import AppKit