Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

fix(lume): skip first-login Setup Assistant

Francesco Bonaccied4b246992e8
diff --git a/libs/lume/src/Unattended/MacOSOfflineSetupPatcher.swift b/libs/lume/src/Unattended/MacOSOfflineSetupPatcher.swift
index cb7c2c27cc..861f61ac09 100644
--- a/libs/lume/src/Unattended/MacOSOfflineSetupPatcher.swift
+++ b/libs/lume/src/Unattended/MacOSOfflineSetupPatcher.swift
@@ -301,9 +301,9 @@ final class MacOSOfflineSetupPatcher {
var loginwindow = try readPlistIfPresent(loginwindowPath)
var accountInfo = loginwindow["AccountInfo"] as? [String: Any] ?? [:]
- var firstLogins = accountInfo["FirstLogins"] as? [String: Any] ?? [:]
- firstLogins[user.username] = 1
- accountInfo["FirstLogins"] = firstLogins
+ // A FirstLogins entry causes macOS to launch Setup Assistant on the
+ // next graphical login, even when .AppleSetupDone is present.
+ accountInfo.removeValue(forKey: "FirstLogins")
accountInfo["MaximumUsers"] = max(accountInfo["MaximumUsers"] as? Int ?? 1, 1)
accountInfo["OnConsole"] = accountInfo["OnConsole"] as? [String: Any] ?? [:]