Summary: Fixes T3696. Currently, we abort. If stdin is not a TTY, we should just continue. A script which cares could conceivably run `arc lint` and `arc unit` separately, but it seems unlikely that any script would ever want to fail here.
Test Plan: Ran `echo -n '' | arc diff --create --verbatim` with a lint error and got a revision (D6720).
Reviewers: Firehed, btrahan, vrana
Reviewed By: btrahan
CC: aran
Maniphest Tasks: T3696
Differential Revision: https://secure.phabricator.com/D6721
public function handleServerMessage(PhutilConsoleMessage $message) {
$data = $message->getData();
+
+ if ($this->getArgument('excuse')) {
+ try {
+ phutil_console_require_tty();
+ } catch (PhutilConsoleStdinNotInteractiveException $ex) {
+ $this->excuses[$data['type']] = $this->getArgument('excuse');
+ return null;
+ }
+ }
+
$response = '';
if (isset($data['prompt'])) {
$response = phutil_console_prompt($data['prompt'], idx($data, 'history'));