Changeset View
Changeset View
Standalone View
Standalone View
src/workflow/ArcanistWorkflow.php
Context not available. | |||||
if ($information) { | if ($information) { | ||||
$synopsis = $information->getSynopsis(); | $synopsis = $information->getSynopsis(); | ||||
if (strlen($synopsis)) { | if (@strlen($synopsis)) { | ||||
$phutil_workflow->setSynopsis($synopsis); | $phutil_workflow->setSynopsis($synopsis); | ||||
} | } | ||||
Context not available. | |||||
} | } | ||||
$help = $information->getHelp(); | $help = $information->getHelp(); | ||||
if (strlen($help)) { | if (@strlen($help)) { | ||||
// Unwrap linebreaks in the help text so we don't get weird formatting. | // Unwrap linebreaks in the help text so we don't get weird formatting. | ||||
$help = preg_replace("/(?<=\S)\n(?=\S)/", ' ', $help); | $help = preg_replace("/(?<=\S)\n(?=\S)/", ' ', $help); | ||||
Context not available. | |||||
$phutil_workflow->setSynopsis($synopses); | $phutil_workflow->setSynopsis($synopses); | ||||
$help = $this->getCommandHelp(); | $help = $this->getCommandHelp(); | ||||
if (strlen($help)) { | if (@strlen($help)) { | ||||
$phutil_workflow->setHelp($help); | $phutil_workflow->setHelp($help); | ||||
} | } | ||||
Context not available. | |||||
// token-based authentication. Use that instead of all the certificate | // token-based authentication. Use that instead of all the certificate | ||||
// stuff. | // stuff. | ||||
$token = idx($credentials, 'token'); | $token = idx($credentials, 'token'); | ||||
if (strlen($token)) { | if (@strlen($token)) { | ||||
$conduit = $this->getConduit(); | $conduit = $this->getConduit(); | ||||
$conduit->setConduitToken($token); | $conduit->setConduitToken($token); | ||||
Context not available. | |||||
array_slice($args, $ii + 1)); | array_slice($args, $ii + 1)); | ||||
break; | break; | ||||
} else if (!strncmp($arg, '--', 2)) { | } else if (!strncmp($arg, '--', 2)) { | ||||
$arg_key = substr($arg, 2); | $arg_key = @substr($arg, 2); | ||||
$parts = explode('=', $arg_key, 2); | $parts = @explode('=', $arg_key, 2); | ||||
if (count($parts) == 2) { | if (count($parts) == 2) { | ||||
list($arg_key, $val) = $parts; | list($arg_key, $val) = $parts; | ||||
Context not available. | |||||
} | } | ||||
} | } | ||||
} else if (!strncmp($arg, '-', 1)) { | } else if (!strncmp($arg, '-', 1)) { | ||||
$arg_key = substr($arg, 1); | $arg_key = @substr($arg, 1); | ||||
if (empty($short_to_long_map[$arg_key])) { | if (empty($short_to_long_map[$arg_key])) { | ||||
throw new ArcanistUsageException( | throw new ArcanistUsageException( | ||||
pht( | pht( | ||||
Context not available. | |||||
$commit_message = ArcanistCommentRemover::removeComments( | $commit_message = ArcanistCommentRemover::removeComments( | ||||
$commit_message); | $commit_message); | ||||
if (!strlen($commit_message)) { | if (!@strlen($commit_message)) { | ||||
throw new ArcanistUsageException( | throw new ArcanistUsageException( | ||||
pht('You must provide a nonempty commit message.')); | pht('You must provide a nonempty commit message.')); | ||||
} | } | ||||
Context not available. | |||||
$map = $this->getModernCommonDictionary($map); | $map = $this->getModernCommonDictionary($map); | ||||
$details = idx($map, 'userData'); | $details = idx($map, 'userData'); | ||||
if (strlen($details)) { | if (@strlen($details)) { | ||||
$map['details'] = (string)$details; | $map['details'] = (string)$details; | ||||
} | } | ||||
unset($map['userData']); | unset($map['userData']); | ||||
Context not available. | |||||
// the Conduit URI. This might not be correct for Conduit over SSH. | // the Conduit URI. This might not be correct for Conduit over SSH. | ||||
$raw_uri = new PhutilURI($raw_uri); | $raw_uri = new PhutilURI($raw_uri); | ||||
if (!strlen($raw_uri->getDomain())) { | if (!@strlen($raw_uri->getDomain())) { | ||||
$base_uri = $this->getConduitEngine() | $base_uri = $this->getConduitEngine() | ||||
->getConduitURI(); | ->getConduitURI(); | ||||
Context not available. |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0