Browse Source

HADOOP-383. Fix a bug in the streaming contrib module on Windows.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@425339 13f79535-47bb-0310-9956-ffa450edef68
Doug Cutting 19 years ago
parent
commit
735a2229d6

+ 1 - 1
src/contrib/streaming/src/java/org/apache/hadoop/streaming/Environment.java

@@ -33,7 +33,7 @@ public class Environment extends Properties
       String command = null;
       String command = null;
       String OS = System.getProperty("os.name");
       String OS = System.getProperty("os.name");
       String lowerOs = OS.toLowerCase();
       String lowerOs = OS.toLowerCase();
-      if (OS.equals("Windows NT")) {
+      if (OS.indexOf("Windows") > -1) {
          command = "cmd /C set";
          command = "cmd /C set";
       } else if (OS.indexOf("ix") > -1 || OS.indexOf("inux") > -1) {
       } else if (OS.indexOf("ix") > -1 || OS.indexOf("inux") > -1) {
          command = "env";
          command = "env";