瀏覽代碼

HADOOP-1717. Simpler fix that also works on Windows.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@566337 13f79535-47bb-0310-9956-ffa450edef68
Doug Cutting 18 年之前
父節點
當前提交
9b8f2726c0
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/test/org/apache/hadoop/dfs/TestDFSUpgradeFromImage.java

+ 3 - 3
src/test/org/apache/hadoop/dfs/TestDFSUpgradeFromImage.java

@@ -68,10 +68,10 @@ public class TestDFSUpgradeFromImage extends TestCase {
     if ( dfsDir.exists() && !FileUtil.fullyDelete(dfsDir) ) {
       throw new IOException("Could not delete dfs directory '" + dfsDir + "'");
     }
-    String cmd = "bash -c \"gzip -dc '" + FileUtil.makeShellPath(tarFile) + "' | (cd '" +
-                 FileUtil.makeShellPath(dataDir) + "' ; tar -xf -)\"";
+    String cmd = "gzip -dc '" + FileUtil.makeShellPath(tarFile) + "' | (cd '" +
+                 FileUtil.makeShellPath(dataDir) + "' ; tar -xf -)";
     LOG.info("Unpacking the tar file. Cmd : " + cmd);
-    String[] shellCmd = { "sh", "-c", cmd };
+    String[] shellCmd = { "bash", "-c", cmd };
     Command.execCommand(shellCmd);
     
     //Now read the reference info