]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Run unit on background also in waiting for confirmation with `arc diff --excuse`
authorvrana <jakubv@fb.com>
Tue, 23 Oct 2012 22:21:01 +0000 (15:21 -0700)
committervrana <jakubv@fb.com>
Tue, 23 Oct 2012 22:26:23 +0000 (15:26 -0700)
Test Plan: Made lint error, slept in test, verified that tests are finished when I confirm `arc diff --excuse`.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3803

src/workflow/ArcanistDiffWorkflow.php

index 2088f463dad4d1b8c2826882a5e131bbe6789439..81637befbde76326cdb2d3d0806b26bdc64d245d 100644 (file)
@@ -1372,11 +1372,10 @@ EOTEXT
 
   private function getErrorExcuse($type, $prompt, $history) {
     if ($this->getArgument('excuse')) {
-      $prompt .= " Ignore them?";
-      if (!$this->console->confirm($prompt)) {
-        throw new ArcanistUserAbortException();
-      }
-      $this->excuses[$type] = $this->getArgument('excuse');
+      $this->console->sendMessage(array(
+        'type'    => $type,
+        'confirm'  => $prompt." Ignore them?",
+      ));
       return;
     }
 
@@ -1393,7 +1392,12 @@ EOTEXT
 
   public function handleServerMessage(PhutilConsoleMessage $message) {
     $data = $message->getData();
-    $response = phutil_console_prompt($data['prompt'], idx($data, 'history'));
+    $response = '';
+    if (isset($data['prompt'])) {
+      $response = phutil_console_prompt($data['prompt'], idx($data, 'history'));
+    } else if (phutil_console_confirm($data['confirm'])) {
+      $response = $this->getArgument('excuse');
+    }
     if ($response == '') {
       throw new ArcanistUserAbortException();
     }