pig-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From the...@apache.org
Subject svn commit: r1147732 - in /pig/trunk: CHANGES.txt bin/pig
Date Mon, 18 Jul 2011 03:57:24 GMT
Author: thejas
Date: Mon Jul 18 03:57:23 2011
New Revision: 1147732

URL: http://svn.apache.org/viewvc?rev=1147732&view=rev
Log:
PIG-2162: bin/pig should not modify user args (rangadi via thejas)

Modified:
    pig/trunk/CHANGES.txt
    pig/trunk/bin/pig

Modified: pig/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/pig/trunk/CHANGES.txt?rev=1147732&r1=1147731&r2=1147732&view=diff
==============================================================================
--- pig/trunk/CHANGES.txt (original)
+++ pig/trunk/CHANGES.txt Mon Jul 18 03:57:23 2011
@@ -79,6 +79,8 @@ PIG-2011: Speed up TestTypedMap.java (dv
 
 BUG FIXES
 
+PIG-2162: bin/pig should not modify user args (rangadi via thejas)
+
 PIG-2060: Fix errors in pig grammars reported by ANTLRWorks (azaroth via thejas)
 
 PIG-2156: Limit/Sample with variable does not work if the expression starts 

Modified: pig/trunk/bin/pig
URL: http://svn.apache.org/viewvc/pig/trunk/bin/pig?rev=1147732&r1=1147731&r2=1147732&view=diff
==============================================================================
--- pig/trunk/bin/pig (original)
+++ pig/trunk/bin/pig Mon Jul 18 03:57:23 2011
@@ -45,12 +45,13 @@ CYGWIN*) cygwin=true;;
 esac
 debug=false
 
+remaining=()
 # filter command line parameter
-for f in $@; do
+for f in "$@"; do
      if [[ $f = "-secretDebugCmd" ]]; then
         debug=true
      else
-        remaining="${remaining} $f"
+        remaining+=("$f")
      fi
 done
 
@@ -195,8 +196,8 @@ PIG_OPTS="$PIG_OPTS -Dpig.root.logger=${
 # run it
 if [ "$debug" == "true" ]; then
     echo "dry run:"
-    echo "$JAVA" $JAVA_HEAP_MAX $PIG_OPTS -classpath "$CLASSPATH" $CLASS ${remaining}
+    echo "$JAVA" $JAVA_HEAP_MAX $PIG_OPTS -classpath "$CLASSPATH" $CLASS "${remaining[@]}"
     echo
 else
-    exec "$JAVA" $JAVA_HEAP_MAX $PIG_OPTS -classpath "$CLASSPATH" $CLASS ${remaining}
+    exec "$JAVA" $JAVA_HEAP_MAX $PIG_OPTS -classpath "$CLASSPATH" $CLASS "${remaining[@]}"
 fi



Mime
View raw message