Page MenuHomePhabricator

D11517.id27757.diff
No OneTemporary

D11517.id27757.diff

diff --git a/src/parser/xhpast/bin/xhpast_parse.php b/src/parser/xhpast/bin/xhpast_parse.php
--- a/src/parser/xhpast/bin/xhpast_parse.php
+++ b/src/parser/xhpast/bin/xhpast_parse.php
@@ -11,6 +11,7 @@
function xhpast_build() {
$root = phutil_get_library_root('phutil');
execx('%s', $root.'/../scripts/build_xhpast.sh');
+ xhpast_is_available(true);
}
/**
@@ -67,11 +68,16 @@
/**
* Checks if XHPAST is built and up-to-date.
*
+ * @param bool Force the availability of XHPAST.
* @return bool
*/
-function xhpast_is_available() {
+function xhpast_is_available($force = null) {
static $available;
+ if ($force !== null) {
+ $available = $force;
+ }
+
if ($available === null) {
$available = xhpast_version() == 'xhpast version 5.5.8/1g';
}

File Metadata

Mime Type
text/plain
Expires
Sep 2 2025, 7:38 PM (9 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
10462111
Default Alt Text
D11517.id27757.diff (781 B)

Event Timeline