Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15405460
D21004.id50042.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D21004.id50042.diff
View Options
diff --git a/scripts/arcanist.php b/scripts/arcanist.php
--- a/scripts/arcanist.php
+++ b/scripts/arcanist.php
@@ -5,6 +5,43 @@
require_once dirname(__FILE__).'/__init_script__.php';
+/**
+ * Adjust 'include_path' to add locations where we'll search for libraries.
+ * We look in these places:
+ *
+ * - Next to 'arcanist/'.
+ * - Anywhere in the normal PHP 'include_path'.
+ * - Inside 'arcanist/externals/includes/'.
+ */
+function arcanist_adjust_php_include_path() {
+ // The 'arcanist/' directory.
+ $arcanist_dir = dirname(dirname(__FILE__));
+
+ // The parent directory of 'arcanist/'.
+ $parent_dir = dirname($arcanist_dir);
+
+ // The 'arcanist/externals/includes/' directory.
+ $include_dir = implode(
+ DIRECTORY_SEPARATOR,
+ array(
+ $arcanist_dir,
+ 'externals',
+ 'includes',
+ ));
+
+ $php_include_path = ini_get('include_path');
+ $php_include_path = implode(
+ PATH_SEPARATOR,
+ array(
+ $parent_dir,
+ $php_include_path,
+ $include_dir,
+ ));
+
+ ini_set('include_path', $php_include_path);
+}
+arcanist_adjust_php_include_path();
+
ini_set('memory_limit', -1);
$original_argv = $argv;
@@ -646,7 +683,7 @@
$error = null;
try {
- require_once $location.'/__phutil_library_init__.php';
+ phutil_load_library($location);
} catch (PhutilBootloaderException $ex) {
$error = pht(
"Failed to load phutil library at location '%s'. This library ".
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 19, 11:31 AM (4 h, 1 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7587657
Default Alt Text
D21004.id50042.diff (1 KB)
Attached To
Mode
D21004: Restore old expanded include path rules for workflows which fall through
Attached
Detach File
Event Timeline
Log In to Comment