Changeset View
Changeset View
Standalone View
Standalone View
support/ArcanistRuntime.php
Context not available. | |||||
final class ArcanistRuntime { | final class ArcanistRuntime { | ||||
public function execute(array $argv) { | public function execute(array $argv) { | ||||
$err = $this->checkEnvironment(); | |||||
if ($err) { | try { | ||||
return $err; | $this->checkEnvironment(); | ||||
} catch (Exception $ex) { | |||||
echo "CONFIGURATION ERROR\n\n"; | |||||
echo $ex->getMessage(); | |||||
echo "\n\n"; | |||||
return 1; | |||||
} | } | ||||
PhutilTranslator::getInstance() | PhutilTranslator::getInstance() | ||||
Context not available. | |||||
'minimum supported version ("%s"). Update PHP to continue.', | 'minimum supported version ("%s"). Update PHP to continue.', | ||||
$cur_version, | $cur_version, | ||||
$min_version); | $min_version); | ||||
return $this->fatalError($message); | |||||
throw new Exception($message); | |||||
} | } | ||||
if ($is_windows) { | if ($is_windows) { | ||||
Context not available. | |||||
$problems[] = "PHP was built with this configure command:\n\n{$config}"; | $problems[] = "PHP was built with this configure command:\n\n{$config}"; | ||||
} | } | ||||
$problems = implode("\n\n", $problems); | $problems = implode("\n\n", $problems); | ||||
return $this->fatalError($problems); | |||||
} | |||||
return 0; | throw new Exception($problems); | ||||
} | } | ||||
private function fatalError($message) { | |||||
echo "CONFIGURATION ERROR\n\n"; | |||||
echo $message; | |||||
echo "\n\n"; | |||||
return 1; | |||||
} | } | ||||
private function loadConfiguration(PhutilArgumentParser $args) { | private function loadConfiguration(PhutilArgumentParser $args) { | ||||
Context not available. |