@@ -73,7 +73,16 @@ impl System {
73
73
fn enabled ( self , enabled : HashMap < System , bool > , disabled : HashMap < System , bool > ) -> bool {
74
74
let not_disabled = !disabled[ & self ] ;
75
75
let explicitly_enabled = enabled[ & self ] ;
76
- let no_others_enabled = !self . others ( ) . iter ( ) . any ( |system| enabled[ system] ) ;
76
+ let no_others_enabled = !self
77
+ . others ( )
78
+ . iter ( )
79
+ . any ( |system| * enabled. get ( system) . unwrap_or ( & false ) ) ;
80
+
81
+ // Special case for Unix family
82
+ if self . is_specific_unix ( ) && enabled. get ( & System :: Unix ) . copied ( ) . unwrap_or ( false ) {
83
+ return !disabled. get ( & self ) . copied ( ) . unwrap_or ( false ) ;
84
+ }
85
+
77
86
not_disabled && ( explicitly_enabled || no_others_enabled)
78
87
}
79
88
}
@@ -207,6 +216,7 @@ impl<'src, D> Recipe<'src, D> {
207
216
( System :: Linux , linux. unwrap_or ( false ) ) ,
208
217
( System :: OpenBSD , openbsd. unwrap_or ( false ) ) ,
209
218
( System :: Unix , unix. unwrap_or ( false ) ) ,
219
+ ( System :: Unrecognized , false ) ,
210
220
]
211
221
. into_iter ( )
212
222
. collect ( ) ;
@@ -217,6 +227,7 @@ impl<'src, D> Recipe<'src, D> {
217
227
( System :: Linux , linux. is_some_and ( bool:: not) ) ,
218
228
( System :: OpenBSD , openbsd. is_some_and ( bool:: not) ) ,
219
229
( System :: Unix , unix. is_some_and ( bool:: not) ) ,
230
+ ( System :: Unrecognized , false ) ,
220
231
]
221
232
. into_iter ( )
222
233
. collect ( ) ;
0 commit comments