Changeset View
Changeset View
Standalone View
Standalone View
src/toolset/ArcanistPrompt.php
Context not available. | |||||
} | } | ||||
$query = $this->getQuery(); | $query = $this->getQuery(); | ||||
if (!strlen($query)) { | if (!@strlen($query)) { | ||||
throw new Exception( | throw new Exception( | ||||
pht( | pht( | ||||
'Prompt ("%s") has no query text!', | 'Prompt ("%s") has no query text!', | ||||
Context not available. | |||||
pht('fread() from stdin failed with an error.')); | pht('fread() from stdin failed with an error.')); | ||||
} | } | ||||
if (!strlen($bytes)) { | if (!@strlen($bytes)) { | ||||
break; | break; | ||||
} | } | ||||
$response .= $bytes; | $response .= $bytes; | ||||
} | } | ||||
if (!strlen($response)) { | if (!@strlen($response)) { | ||||
continue; | continue; | ||||
} | } | ||||
Context not available. | |||||
} | } | ||||
$response = trim($response); | $response = trim($response); | ||||
if (!strlen($response)) { | if (!@strlen($response)) { | ||||
$response = $default; | $response = $default; | ||||
} | } | ||||
} | } | ||||
Context not available. | |||||
$save_scope = null; | $save_scope = null; | ||||
if (!$is_saved) { | if (!$is_saved) { | ||||
$matches = null; | $matches = null; | ||||
if (preg_match('(^(.*)([!*])\z)', $response, $matches)) { | if (@preg_match('(^(.*)([!*])\z)', $response, $matches)) { | ||||
$response = $matches[1]; | $response = $matches[1]; | ||||
if ($matches[2] === '*') { | if ($matches[2] === '*') { | ||||
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