mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 14:52:41 +01:00
Use libphutil script initializer to initialize scripts in Phabricator
Summary: libphutil has some basic environmental sanity checks that we should use when initializing scripts in Phabricator. Principally this: https://secure.phabricator.com/diffusion/PHU/browse/master/scripts/__init_script__.php;db643ee9f5f524e7$26 Without this, the default ini may set CLI errors to go to some logfile, which means exceptions aren't shown on stderr. See https://github.com/facebook/phabricator/issues/98/ Test Plan: - Ran "php -derror_log=/dev/null -f ./bin/phd debug adslkfnasdfnalks" prior to change; got confusing lack of output. - Ran "phd -derror_log=/dev/null -f ./bin/phd debug asdkflnaslfdnala" after change; got exception on stderr. Reviewers: btrahan, killermonk Reviewed By: btrahan CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D1950
This commit is contained in:
parent
1fc4dea55e
commit
097e62b45c
1 changed files with 2 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* Copyright 2011 Facebook, Inc.
|
||||
* Copyright 2012 Facebook, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -21,7 +21,7 @@ ini_set('display_errors', 1);
|
|||
|
||||
$include_path = ini_get('include_path');
|
||||
ini_set('include_path', $include_path.':'.dirname(__FILE__).'/../../');
|
||||
@include_once 'libphutil/src/__phutil_library_init__.php';
|
||||
@include_once 'libphutil/scripts/__init_script__.php';
|
||||
if (!@constant('__LIBPHUTIL__')) {
|
||||
echo "ERROR: Unable to load libphutil. Update your PHP 'include_path' to ".
|
||||
"include the parent directory of libphutil/.\n";
|
||||
|
|
Loading…
Reference in a new issue