From 5e59759cf587021991ec74697eaafe9db6933597 Mon Sep 17 00:00:00 2001 From: Miccal Matthews Date: Sun, 30 Jan 2022 18:47:10 +0800 Subject: [PATCH] Update teamviewer.rb --- Casks/teamviewer.rb | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/Casks/teamviewer.rb b/Casks/teamviewer.rb index 6ae276573336a..f31e315a17f6d 100644 --- a/Casks/teamviewer.rb +++ b/Casks/teamviewer.rb @@ -31,24 +31,28 @@ pkg "Install TeamViewer.app/Contents/Resources/Install TeamViewer.pkg" end - uninstall delete: [ - "#{staged_path}/#{token}", # This Cask should be uninstalled manually. - "/Applications/TeamViewer.app", - "/Library/Preferences/com.teamviewer.teamviewer.preferences.plist", - ], - pkgutil: [ - "com.teamviewer.remoteaudiodriver", - "com.teamviewer.teamviewer.*", - ], - launchctl: [ - "com.teamviewer.desktop", - "com.teamviewer.Helper", - "com.teamviewer.service", - "com.teamviewer.teamviewer_desktop", - "com.teamviewer.teamviewer_service", - "com.teamviewer.teamviewer", - ], - quit: "com.teamviewer.TeamViewer" + if MacOS.version == :catalina + uninstall delete: "#{staged_path}/#{token}" # This Cask should be uninstalled manually. + else + uninstall delete: [ + "#{staged_path}/#{token}", # This Cask should be uninstalled manually. + "/Applications/TeamViewer.app", + "/Library/Preferences/com.teamviewer.teamviewer.preferences.plist", + ], + pkgutil: [ + "com.teamviewer.remoteaudiodriver", + "com.teamviewer.teamviewer.*", + ], + launchctl: [ + "com.teamviewer.desktop", + "com.teamviewer.Helper", + "com.teamviewer.service", + "com.teamviewer.teamviewer_desktop", + "com.teamviewer.teamviewer_service", + "com.teamviewer.teamviewer", + ], + quit: "com.teamviewer.TeamViewer" + end zap trash: [ "~/Library/Application Support/TeamViewer",