Skip to content

Commit acb5268

Browse files
Fixed uninstaller
1 parent 99414ee commit acb5268

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Applite/Utilities/Other/UninstallSelf.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,14 @@ private func uninstallHomebrewCompletely() async throws {
8888

8989
// Check if it's a ShellError and provide better error message
9090
if case .nonZeroExit(_, let exitCode, let output) = error as? ShellError {
91+
// Handle case where Homebrew is not found (this is not really an error)
92+
if output.contains("Failed to locate Homebrew") ||
93+
output.contains("Homebrew is not installed") ||
94+
output.contains("No such file or directory") && output.contains("brew") {
95+
logger.notice("Homebrew not found - it may already be uninstalled or never installed")
96+
return // Exit successfully since there's nothing to uninstall
97+
}
98+
9199
if exitCode == 127 || output.contains("Permission denied") || output.contains("sudo") || output.contains("administrator") {
92100
throw NSError(
93101
domain: "HomebrewUninstallError",

0 commit comments

Comments
 (0)