Skip to content
This repository was archived by the owner on Feb 2, 2022. It is now read-only.

Commit 7c45a03

Browse files
committed
Merge pull request #6 from nodes-ios/RealmSupport
Doesn't prompt to copy to applications when used with homebrew
2 parents 1d794e9 + a9e4cac commit 7c45a03

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

Model Boiler/Classes/Support/Extensions.swift

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ extension NSApplication {
3434
}
3535

3636
func verifyAppInstallLocation() {
37-
if !isInApplications() {
37+
if !isInApplications() && !isInBrewsFolder() {
3838

3939
let alert = NSAlert()
4040
alert.addButtonWithTitle("Install in Applications folder")
@@ -72,9 +72,15 @@ extension NSApplication {
7272

7373
return sourcePath == expectedPath
7474
}
75+
76+
func isInBrewsFolder() -> Bool {
77+
let sourcePath = NSBundle.mainBundle().bundlePath
78+
79+
return sourcePath.containsString("homebrew-cask/Caskroom")
80+
}
7581

7682
func moveToApplicationsIfNecessary() throws {
77-
if isInApplications() { return }
83+
if isInApplications() || isInBrewsFolder() { return }
7884

7985
let bundle = NSBundle.mainBundle()
8086
let sourcePath = bundle.bundlePath

Model Boiler/Classes/User Interface/StatusBarController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ class StatusBarController: NSObject, NSMenuDelegate {
170170
SettingsManager.setSetting(.OnlyCreateInitializer, enabled: newState)
171171

172172
if let camelCaseItem = optionsMenu.itemWithTag(MenuItem.OnlyCreateInitializer.rawValue) {
173-
camelCaseItem.state = newState == true ? NSOffState : NSOnState
173+
camelCaseItem.state = newState == true ? NSOnState : NSOffState
174174
}
175175
}
176176

Model Boiler/Supporting Files/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
<key>CFBundlePackageType</key>
1818
<string>APPL</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>2.1.3</string>
20+
<string>2.1.4</string>
2121
<key>CFBundleSignature</key>
2222
<string>????</string>
2323
<key>CFBundleVersion</key>
24-
<string>13</string>
24+
<string>14</string>
2525
<key>LSApplicationCategoryType</key>
2626
<string>public.app-category.utilities</string>
2727
<key>LSMinimumSystemVersion</key>

0 commit comments

Comments
 (0)