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

jensdeppe pushed a commit to branch feature/GEODE-5212
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/feature/GEODE-5212 by this 
push:
     new 5e595d7  Because Windows...
5e595d7 is described below

commit 5e595d769e9fc1d51118d4621e9b58b289c273e7
Author: Jens Deppe <jde...@pivotal.io>
AuthorDate: Thu Jul 26 11:56:17 2018 -0700

    Because Windows...
---
 .../geode/internal/cache/backup/BackupIntegrationTest.java  | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git 
a/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/backup/BackupIntegrationTest.java
 
b/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/backup/BackupIntegrationTest.java
index 9960421..859d3fd 100644
--- 
a/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/backup/BackupIntegrationTest.java
+++ 
b/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/backup/BackupIntegrationTest.java
@@ -391,12 +391,15 @@ public class BackupIntegrationTest {
     scriptContent.forEach(i -> System.out.println("CONTENT: " + i));
 
     boolean isWindows = script.getName().endsWith("bat");
-    // if (isWindows) {
-    // command.add("cmd.exe");
-    // command.add("/c");
-    // }
+    if (isWindows) {
+      command.add("cmd.exe");
+      command.add("/c");
+      command.add(String.format("cd /d %s && %s",
+          script.getCanonicalFile().toPath().getParent().toString(), 
script.getCanonicalPath()));
+    } else {
+      command.add(script.getCanonicalPath());
+    }
 
-    command.add(script.getCanonicalPath());
     ProcessBuilder pb = new ProcessBuilder(command);
     pb.redirectErrorStream(true);
     Process process = pb.start();

Reply via email to