@@ -11,6 +11,11 @@ import ButtonKit
1111
1212struct PresentingSearchResultsView : View
1313{
14+ enum PackageInstallationInitializationError : Error
15+ {
16+ case couldNotStartInstallProcessWithPackage( package : BrewPackage ? )
17+ }
18+
1419 @Environment ( \. dismiss) var dismiss : DismissAction
1520 @Environment ( \. openWindow) var openWindow : OpenWindowAction
1621
@@ -19,7 +24,7 @@ struct PresentingSearchResultsView: View
1924 @ObservedObject var searchResultTracker : SearchResultTracker
2025
2126 @Binding var packageRequested : String
22- @Binding var foundPackageSelection : BrewPackage ?
27+ @Binding var foundPackageSelection : AddFormulaView . PackageSelectedToBeInstalled ?
2328
2429 @Binding var packageInstallationProcessStep : PackageInstallationProcessSteps
2530
@@ -121,7 +126,7 @@ struct PresentingSearchResultsView: View
121126 {
122127 PreviewPackageButtonWithCustomAction
123128 {
124- guard let selectedPackage = foundPackageSelection else
129+ guard let selectedPackage = foundPackageSelection? . package else
125130 {
126131 AppConstants . shared. logger. error ( " Failed to preview package " )
127132
@@ -153,7 +158,7 @@ struct PresentingSearchResultsView: View
153158 // This has to be an AsyncButton so it shakes
154159 AsyncButton
155160 {
156- guard let packageToInstall = foundPackageSelection else
161+ guard let packageToInstall = foundPackageSelection? . package else
157162 {
158163 throw PackageInstallationInitializationError . couldNotStartInstallProcessWithPackage ( package : nil )
159164 }
0 commit comments