File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff 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 " ,
You can’t perform that action at this time.
0 commit comments