Skip to content

Commit 977a446

Browse files
committed
update some logic
1 parent 34aaa64 commit 977a446

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

src/AbstractApplication.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,8 +584,9 @@ public function isProfile(): bool
584584
public function isInteractive(): bool
585585
{
586586
$key = 'no-interactive';
587+
$val = (bool)$this->input->getOpt($key, $this->getParam($key, true));
587588

588-
return (bool)$this->input->getOpt($key, $this->getParam($key, true));
589+
return $val === false;
589590
}
590591

591592
/**

src/AbstractHandler.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,21 @@ public static function setAnnotationTags(array $annotationTags, $replace = false
739739
}
740740

741741
/**
742-
* get current debug level value
742+
* @return bool
743+
*/
744+
public function isInteractive(): bool
745+
{
746+
if ($this->app) {
747+
return $this->app->isInteractive();
748+
}
749+
750+
$value = (bool)$this->input->getLongOpt('no-interactive', false);
751+
752+
return $value === false;
753+
}
754+
755+
/**
756+
* Get current debug level value
743757
*
744758
* @return int
745759
*/

0 commit comments

Comments
 (0)