[DOC-WEB] [web-doc] master: Fix environment variable we use so Git doesn't get confused

[email protected] (Jim Winstead) Tue, 22 Oct 2024 01:46:21 +0000
Newsgroups php.doc.web
Message-ID <[email protected]>
Author: Jim Winstead (jimwins)
Date: 2024-10-21T18:42:54-07:00

Commit: https://github.com/php/web-doc/commit/df0a94d1cf726608280388e9c450d50a1b8f8a9f
Raw diff: https://github.com/php/web-doc/commit/df0a94d1cf726608280388e9c450d50a1b8f8a9f.diff

Fix environment variable we use so Git doesn't get confused

Changed paths:
  M  include/init.inc.php


Diff:

diff --git a/include/init.inc.php b/include/init.inc.php
index 8666a88..96e65c4 100644
--- a/include/init.inc.php
+++ b/include/init.inc.php
@@ -25,9 +25,9 @@
 if (file_exists($build_ops)) {
     require_once($build_ops);
 } else {
-    $GIT_DIR = getenv('GIT_DIR');
+    $GIT_DIR = getenv('PHPDOC_GIT_DIR');
     if ($GIT_DIR == '') {
-        die("Unable to find Git repositories, set `GIT_DIR` environment variable!");
+        die("Unable to find Git repositories, set `PHPDOC_GIT_DIR` environment variable!");
     }
     $GIT_DIR .= (substr($GIT_DIR, -1) == '/' ? '' : '/');
     define('GIT_DIR', $GIT_DIR);