From: epriestley Date: Mon, 7 May 2012 13:06:38 +0000 (-0700) Subject: Explicitly check for cURL in "arc" X-Git-Tag: conduit-4~22 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=c3a404995062d87c3e12b8207c4f77e68ba90c02;p=arcanist.git Explicitly check for cURL in "arc" Summary: We do this in Windows, but it's not available by default in Ubuntu Test Plan: Ran "arc" after faking the function name, got a reasonable error. Reviewers: btrahan, jungejason Reviewed By: btrahan CC: aran Differential Revision: https://secure.phabricator.com/D2404 --- diff --git a/scripts/arcanist.php b/scripts/arcanist.php index 96e42d56..f73fdc29 100755 --- a/scripts/arcanist.php +++ b/scripts/arcanist.php @@ -332,7 +332,12 @@ function sanity_check_environment() { ); } else { $need_functions = array( - 'json_decode' => array('flag', '--without-json'), + 'curl_init' => array( + 'text', + "You need to install the cURL PHP extension, maybe with ". + "'apt-get install php5-curl' or 'yum install php53-curl' or ". + "something similar."), + 'json_decode' => array('flag', '--without-json'), ); } @@ -378,6 +383,11 @@ function sanity_check_environment() { "'extension={$which}'."; } + if ($what == 'text') { + $generic = false; + $problems[] = $which; + } + if ($generic) { $problems[] = "This build of PHP is missing the required function '{$fname}()'. ".