liunaijie commented on code in PR #6387:
URL: https://github.com/apache/seatunnel/pull/6387#discussion_r1561898651


##########
seatunnel-core/seatunnel-core-starter/src/main/java/org/apache/seatunnel/core/starter/command/ConfEncryptCommand.java:
##########
@@ -53,10 +56,19 @@ public void execute() throws CommandExecuteException, 
ConfigCheckException {
         checkConfigExist(configPath);
         Config config =
                 ConfigFactory.parseFile(configPath.toFile())
-                        
.resolve(ConfigResolveOptions.defaults().setAllowUnresolved(true))
-                        .resolveWith(
-                                ConfigFactory.systemProperties(),
-                                
ConfigResolveOptions.defaults().setAllowUnresolved(true));
+                        
.resolve(ConfigResolveOptions.defaults().setAllowUnresolved(true));
+        if (abstractCommandArgs.variables != null) {
+            Map<String, String> map =
+                    abstractCommandArgs.variables.stream()
+                            .filter(Objects::nonNull)
+                            .map(variable -> variable.split("=", 2))
+                            .filter(pair -> pair.length == 2F)
+                            .collect(Collectors.toMap(pair -> pair[0], pair -> 
pair[1]));
+            config =
+                    config.resolveWith(
+                            ConfigFactory.parseMap(map),

Review Comment:
   oh, i need change all of them to system properties. 
   when i test the array type variabel replacement, i find it only can be 
replace when use system properties. 
   



-- 
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