Commit 487f3f36 authored by Sebastian Kummer's avatar Sebastian Kummer

ZP-1103 redirect error output of 'hash git' to /dev/null.

Released under the Affero GNU General Public License (AGPL) version 3.
parent c9162767
......@@ -25,8 +25,8 @@
if (!defined("ZPUSH_VERSION")) {
$path = escapeshellarg(dirname(realpath($_SERVER['SCRIPT_FILENAME'])));
$branch = trim(exec("hash git && cd $path >/dev/null 2>&1 && git branch --no-color 2>/dev/null | sed -e '/^[^*]/d' -e \"s/* \(.*\)/\\1/\""));
$version = exec("hash git && cd $path >/dev/null 2>&1 && git describe --always &2>/dev/null");
$branch = trim(exec("hash git 2>/dev/null && cd $path >/dev/null 2>&1 && git branch --no-color 2>/dev/null | sed -e '/^[^*]/d' -e \"s/* \(.*\)/\\1/\""));
$version = exec("hash git 2>/dev/null && cd $path >/dev/null 2>&1 && git describe --always 2>/dev/null");
if ($branch && $version) {
define("ZPUSH_VERSION", $branch .'-'. $version);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment