@@ -39,7 +39,6 @@ pub struct Configurator {
39
39
discovery : Discovery ,
40
40
statement_parser : Statement ,
41
41
progress_format : ProgressFormat ,
42
- pub process_expressions : bool ,
43
42
}
44
43
45
44
/// Add the results of an export operation to a configuration.
@@ -275,7 +274,6 @@ impl Configurator {
275
274
discovery : discovery. clone ( ) ,
276
275
statement_parser : Statement :: new ( ) ?,
277
276
progress_format,
278
- process_expressions : true ,
279
277
} ;
280
278
config. validate_config ( ) ?;
281
279
for extension in discovery. extensions . values ( ) {
@@ -672,7 +670,7 @@ impl Configurator {
672
670
673
671
fn skip_resource ( & mut self , resource : & Resource ) -> Result < bool , DscError > {
674
672
if let Some ( condition) = & resource. condition {
675
- let condition_result = self . statement_parser . parse_and_execute ( condition, & self . context , self . process_expressions ) ?;
673
+ let condition_result = self . statement_parser . parse_and_execute ( condition, & self . context ) ?;
676
674
if condition_result != Value :: Bool ( true ) {
677
675
info ! ( "{}" , t!( "configure.config_doc.skippingResource" , name = resource. name, condition = condition, result = condition_result) ) ;
678
676
return Ok ( true ) ;
@@ -724,7 +722,7 @@ impl Configurator {
724
722
// default values can be expressions
725
723
let value = if default_value. is_string ( ) {
726
724
if let Some ( value) = default_value. as_str ( ) {
727
- self . statement_parser . parse_and_execute ( value, & self . context , self . process_expressions ) ?
725
+ self . statement_parser . parse_and_execute ( value, & self . context ) ?
728
726
} else {
729
727
return Err ( DscError :: Parser ( t ! ( "configure.mod.defaultStringNotDefined" ) . to_string ( ) ) ) ;
730
728
}
@@ -785,7 +783,7 @@ impl Configurator {
785
783
786
784
for ( name, value) in variables {
787
785
let new_value = if let Some ( string) = value. as_str ( ) {
788
- self . statement_parser . parse_and_execute ( string, & self . context , self . process_expressions ) ?
786
+ self . statement_parser . parse_and_execute ( string, & self . context ) ?
789
787
}
790
788
else {
791
789
value. clone ( )
@@ -889,7 +887,7 @@ impl Configurator {
889
887
let Some ( statement) = element. as_str ( ) else {
890
888
return Err ( DscError :: Parser ( t ! ( "configure.mod.arrayElementCouldNotTransformAsString" ) . to_string ( ) ) ) ;
891
889
} ;
892
- let statement_result = self . statement_parser . parse_and_execute ( statement, & self . context , self . process_expressions ) ?;
890
+ let statement_result = self . statement_parser . parse_and_execute ( statement, & self . context ) ?;
893
891
let Some ( string_result) = statement_result. as_str ( ) else {
894
892
return Err ( DscError :: Parser ( t ! ( "configure.mod.arrayElementCouldNotTransformAsString" ) . to_string ( ) ) ) ;
895
893
} ;
@@ -907,7 +905,7 @@ impl Configurator {
907
905
let Some ( statement) = value. as_str ( ) else {
908
906
return Err ( DscError :: Parser ( t ! ( "configure.mod.valueCouldNotBeTransformedAsString" , value = value) . to_string ( ) ) ) ;
909
907
} ;
910
- let statement_result = self . statement_parser . parse_and_execute ( statement, & self . context , self . process_expressions ) ?;
908
+ let statement_result = self . statement_parser . parse_and_execute ( statement, & self . context ) ?;
911
909
if let Some ( string_result) = statement_result. as_str ( ) {
912
910
result. insert ( name. clone ( ) , Value :: String ( string_result. to_string ( ) ) ) ;
913
911
} else {
0 commit comments