nvazquez commented on code in PR #11947:
URL: https://github.com/apache/cloudstack/pull/11947#discussion_r2691394659


##########
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtConvertInstanceCommandWrapper.java:
##########
@@ -244,7 +245,12 @@ protected boolean performInstanceConversion(String 
originalVMName, String source
 
         String logPrefix = String.format("(%s) virt-v2v ovf source: %s 
progress", originalVMName, sourceOVFDirPath);
         OutputInterpreter.LineByLineOutputLogger outputLogger = new 
OutputInterpreter.LineByLineOutputLogger(logger, logPrefix);
-        script.execute(outputLogger);
+        String[] convertInstanceEnv = serverResource.getConvertInstanceEnv();
+        if (ArrayUtils.isEmpty(convertInstanceEnv)) {
+            script.execute(outputLogger);
+        } else {
+            script.execute(outputLogger, convertInstanceEnv);
+        }

Review Comment:
   @shwstppr @DaanHoogland I would prefer keeping it like this as 
`script.execute(outputLogger);` has 73 usages which will need passing null as 
the second parameter. I think keeping it like this it cleaner



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