Follow-up r75476: Windows set command treats everything until the && as part of the...
authorBryan Tong Minh <btongminh@users.mediawiki.org>
Sat, 18 Dec 2010 15:00:11 +0000 (15:00 +0000)
committerBryan Tong Minh <btongminh@users.mediawiki.org>
Sat, 18 Dec 2010 15:00:11 +0000 (15:00 +0000)
includes/GlobalFunctions.php

index 2e8986e..1dd24ae 100644 (file)
@@ -2511,7 +2511,7 @@ function wfShellExec( $cmd, &$retval = null, $environ = array() ) {
                         * Note however that the quote isn't listed there, but is needed, and the parentheses
                         * are listed there but doesn't appear to need it.
                         */
-                       $envcmd .= "set $k=" . preg_replace( '/([&|()<>^"])/', '^\\1', $v ) . ' && ';
+                       $envcmd .= "set $k=" . preg_replace( '/([&|()<>^"])/', '^\\1', $v ) . '&& ';
                } else {
                        /* Assume this is a POSIX shell, thus required to accept variable assignments before the command
                         * http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_09_01