File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -44,8 +44,8 @@ public static function apply(?array $conditions, Host $host): bool
4444 }
4545
4646 $ labels = $ host ->get ('labels ' , []);
47- $ labels ['__host__ ' ] = $ host ->getAlias ();
48- $ labels ['__all__ ' ] = 'yes ' ;
47+ $ labels ['alias ' ] = $ host ->getAlias ();
48+ $ labels ['true ' ] = 'true ' ;
4949 $ isTrue = function ($ value ) {
5050 return $ value ;
5151 };
@@ -94,13 +94,13 @@ public static function parse(string $expression): array
9494 foreach (explode ('& ' , $ sub ) as $ part ) {
9595 $ part = trim ($ part );
9696 if ($ part === 'all ' ) {
97- $ conditions [] = ['= ' , '__all__ ' , 'yes ' ];
97+ $ conditions [] = ['= ' , 'true ' , 'true ' ];
9898 continue ;
9999 }
100100 if (preg_match ('/(?<var>.+?)(?<op>!?=)(?<value>.+)/ ' , $ part , $ match )) {
101101 $ conditions [] = [$ match ['op ' ], trim ($ match ['var ' ]), trim ($ match ['value ' ])];
102102 } else {
103- $ conditions [] = ['= ' , '__host__ ' , trim ($ part )];
103+ $ conditions [] = ['= ' , 'alias ' , trim ($ part )];
104104 }
105105 }
106106 $ all [] = $ conditions ;
You can’t perform that action at this time.
0 commit comments