Skip to content

Commit

Permalink
macos is annoying
Browse files Browse the repository at this point in the history
  • Loading branch information
yellowsink committed Nov 29, 2024
1 parent 2ab110d commit f955b58
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,14 @@ func uninstallTraditionalShelter(instance DiscordInstance, removing bool) bool {
} else {
err = os.Rename(filepath.Join(instance.PathRes, "original.asar"), filepath.Join(instance.PathRes, "app.asar"))

// macos sucks, so we need to double-check that this actually goddamn worked. great.
_, serr := os.Stat(filepath.Join(instance.PathRes, "app.asar"))

if serr != nil {
dialog.Message("%s", "Removing your old-style shelter installation requires the App Management permission. Please allow this in System Settings > Security & Privacy > Privacy and try again, or manually uninstall shelter.").Error()
return false
}

if err == nil {
err = os.RemoveAll(filepath.Join(instance.PathRes, "app"))
}
Expand Down

0 comments on commit f955b58

Please sign in to comment.