@@ -39,7 +39,6 @@ pub struct Configurator {
3939 discovery : Discovery ,
4040 statement_parser : Statement ,
4141 progress_format : ProgressFormat ,
42- pub process_expressions : bool ,
4342}
4443
4544/// Add the results of an export operation to a configuration.
@@ -275,7 +274,6 @@ impl Configurator {
275274 discovery : discovery. clone ( ) ,
276275 statement_parser : Statement :: new ( ) ?,
277276 progress_format,
278- process_expressions : true ,
279277 } ;
280278 config. validate_config ( ) ?;
281279 for extension in discovery. extensions . values ( ) {
@@ -672,7 +670,7 @@ impl Configurator {
672670
673671 fn skip_resource ( & mut self , resource : & Resource ) -> Result < bool , DscError > {
674672 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 ) ?;
676674 if condition_result != Value :: Bool ( true ) {
677675 info ! ( "{}" , t!( "configure.config_doc.skippingResource" , name = resource. name, condition = condition, result = condition_result) ) ;
678676 return Ok ( true ) ;
@@ -724,7 +722,7 @@ impl Configurator {
724722 // default values can be expressions
725723 let value = if default_value. is_string ( ) {
726724 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 ) ?
728726 } else {
729727 return Err ( DscError :: Parser ( t ! ( "configure.mod.defaultStringNotDefined" ) . to_string ( ) ) ) ;
730728 }
@@ -785,7 +783,7 @@ impl Configurator {
785783
786784 for ( name, value) in variables {
787785 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 ) ?
789787 }
790788 else {
791789 value. clone ( )
@@ -889,7 +887,7 @@ impl Configurator {
889887 let Some ( statement) = element. as_str ( ) else {
890888 return Err ( DscError :: Parser ( t ! ( "configure.mod.arrayElementCouldNotTransformAsString" ) . to_string ( ) ) ) ;
891889 } ;
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 ) ?;
893891 let Some ( string_result) = statement_result. as_str ( ) else {
894892 return Err ( DscError :: Parser ( t ! ( "configure.mod.arrayElementCouldNotTransformAsString" ) . to_string ( ) ) ) ;
895893 } ;
@@ -907,7 +905,7 @@ impl Configurator {
907905 let Some ( statement) = value. as_str ( ) else {
908906 return Err ( DscError :: Parser ( t ! ( "configure.mod.valueCouldNotBeTransformedAsString" , value = value) . to_string ( ) ) ) ;
909907 } ;
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 ) ?;
911909 if let Some ( string_result) = statement_result. as_str ( ) {
912910 result. insert ( name. clone ( ) , Value :: String ( string_result. to_string ( ) ) ) ;
913911 } else {
0 commit comments