Skip to content

Commit bff6837

Browse files
authored
Merge pull request #354 from asgrim/fix-non-interactive-check
Fix non-interactive check
2 parents 4f5fa2e + b8127b6 commit bff6837

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Platform.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,9 @@ class Platform
2626
{
2727
public static function isInteractive(): bool
2828
{
29-
$stdin = defined('STDIN') ? STDIN : fopen('php://stdin', 'r');
30-
$noInteractionEnv = ComposerPlatform::getEnv('COMPOSER_NO_INTERACTION');
29+
$stdin = defined('STDIN') ? STDIN : fopen('php://stdin', 'r');
3130

32-
return $noInteractionEnv !== false
33-
&& $noInteractionEnv !== '1'
31+
return ComposerPlatform::getEnv('COMPOSER_NO_INTERACTION') !== '1'
3432
&& $stdin !== false
3533
&& ComposerPlatform::isTty($stdin);
3634
}

0 commit comments

Comments
 (0)