jballment commented on issue #7174:
URL: https://github.com/apache/hop/issues/7174#issuecomment-4541553059

   My proposed solution is the check if the described variable already exists 
as a System property and set the described variable = system property if it 
does exist:
   
   `diff --git a/engine/src/main/java/org/apache/hop/core/HopEnvironment.java 
b/engine/src/main/java/org/apache/hop/core/HopEnvironment.java
   index 71bb0817ea..577e83d88f 100644
   --- a/engine/src/main/java/org/apache/hop/core/HopEnvironment.java
   +++ b/engine/src/main/java/org/apache/hop/core/HopEnvironment.java
   @@ -146,8 +146,12 @@ public class HopEnvironment {
            //
            for (DescribedVariable describedVariable : 
hopConfig.getDescribedVariables()) {
              if (StringUtils.isNotEmpty(describedVariable.getName())) {
   -            System.setProperty(
   -                describedVariable.getName(), 
Const.NVL(describedVariable.getValue(), ""));
   +            if 
(StringUtils.isEmpty(System.getProperty(describedVariable.getName()))) {
   +              System.setProperty(
   +                  describedVariable.getName(), 
Const.NVL(describedVariable.getValue(), ""));
   +            } else {
   +              
describedVariable.setValue(System.getProperty(describedVariable.getName()));
   +            }
              }
            }
   `


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to