This is an automated email from the ASF dual-hosted git repository.

jensdeppe pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
     new 5e47f27  GEODE-5441: Use cmd.exe when invoking gfsh.bat in GfshRule 
(#2147)
5e47f27 is described below

commit 5e47f27fe8587e882161032fc93c66be61988f57
Author: Jens Deppe <jde...@pivotal.io>
AuthorDate: Tue Jul 17 14:55:45 2018 -0700

    GEODE-5441: Use cmd.exe when invoking gfsh.bat in GfshRule (#2147)
---
 .../java/org/apache/geode/test/junit/rules/gfsh/GfshRule.java     | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git 
a/geode-junit/src/main/java/org/apache/geode/test/junit/rules/gfsh/GfshRule.java
 
b/geode-junit/src/main/java/org/apache/geode/test/junit/rules/gfsh/GfshRule.java
index 8d822eb..0163897 100644
--- 
a/geode-junit/src/main/java/org/apache/geode/test/junit/rules/gfsh/GfshRule.java
+++ 
b/geode-junit/src/main/java/org/apache/geode/test/junit/rules/gfsh/GfshRule.java
@@ -142,6 +142,11 @@ public class GfshRule extends ExternalResource {
 
   protected ProcessBuilder toProcessBuilder(GfshScript gfshScript, Path 
gfshPath, File workingDir) {
     List<String> commandsToExecute = new ArrayList<>();
+
+    if (isWindows()) {
+      commandsToExecute.add("cmd.exe");
+      commandsToExecute.add("/c");
+    }
     commandsToExecute.add(gfshPath.toAbsolutePath().toString());
 
     for (String command : gfshScript.getCommands()) {
@@ -158,7 +163,8 @@ public class GfshRule extends ExternalResource {
       String existingJavaArgs = environmentMap.get(classpathKey);
       String specified = String.join(PATH_SEPARATOR, extendedClasspath);
       String newValue =
-          String.format("%s%s", existingJavaArgs == null ? "" : 
existingJavaArgs + ":", specified);
+          String.format("%s%s", existingJavaArgs == null ? "" : 
existingJavaArgs + PATH_SEPARATOR,
+              specified);
       environmentMap.put(classpathKey, newValue);
     }
 

Reply via email to