Skip to content

Commit

Permalink
Caputure dev preview bundle ID during installation
Browse files Browse the repository at this point in the history
Without this patch installer just go ahead and install/replace
bits without checking if app is running or not which might corupt
it or install it in different location.

```
$ /usr/libexec/PlistBuddy -c 'Print CFBundleIdentifier' /Applications/CodeReady\ Containers.app/Contents/Info.plist
com.electron.crc-tray
```
  • Loading branch information
praveenkumar committed Dec 31, 2021
1 parent def3cb8 commit f1499b9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packaging/darwin/Distribution.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ function installCheck() {
return false;
}

var apps = system.applications.fromIdentifier('com.electron.crc-tray');
if(apps) {
my.result.title = 'Update failed';
my.result.message = 'CodeReady Containers dev preview is running. Please stop the application before updating.';
my.result.type = 'Fatal';
return false;
}

if(!(system.compareVersions(system.version.ProductVersion, '10.14.0') >= 0)) {
my.result.title = 'Unable to install';
my.result.message = 'CodeReady Containers requires macOS 10.14 or later.';
Expand Down

0 comments on commit f1499b9

Please sign in to comment.