You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -66,8 +68,9 @@ protected function getDefaultInputDefinition()
66
68
returnnewInputDefinition([
67
69
newInputArgument('command', InputArgument::REQUIRED, 'The command to execute'),
68
70
newInputOption('--help', '-h', InputOption::VALUE_NONE, 'Display this help message'),
69
-
newInputOption('--verbose', '-v|vv|vvv', InputOption::VALUE_NONE, 'Increase the verbosity of messages'),
70
71
newInputOption('--version', '-V', InputOption::VALUE_NONE, 'Display this application version'),
72
+
newInputOption('--verbose', '-v|vv|vvv', InputOption::VALUE_NONE, 'Increase the verbosity of messages'),
73
+
newInputOption('--quiet', '-q', InputOption::VALUE_NONE, 'Only print necessary output; suppress other messages and errors. This implies --no-interaction. It is ignored in verbose mode.'),
71
74
newInputOption('--yes', '-y', InputOption::VALUE_NONE, 'Answer "yes" to confirmation questions; accept the default value for other questions; disable interaction'),
72
75
newInputOption(
73
76
'--no-interaction',
@@ -80,7 +83,6 @@ protected function getDefaultInputDefinition()
newHiddenInputOption('--no', '-n', InputOption::VALUE_NONE, 'Answer "no" to confirmation questions; accept the default value for other questions; disable interaction'),
83
-
newHiddenInputOption('--quiet', '-q', InputOption::VALUE_NONE, 'Do not output any message'),
if ($input->hasParameterOption(['--yes', '-y', '--no-interaction', '-n', '--no'], true)
348
+
|| getenv($this->envPrefix . 'NO_INTERACTION')) {
349
+
$input->setInteractive(false);
350
+
351
+
// Deprecate the -n flag as a shortcut for --no.
352
+
// It is confusing as it's a shortcut for --no-interaction in other Symfony Console commands.
353
+
if ($input->hasParameterOption('-n', true)) {
354
+
$stdErr->writeln('<options=reverse>DEPRECATED</> The -n flag (as a shortcut for --no) is deprecated. It will be removed or changed in a future version.');
355
+
}
356
+
} elseif (\function_exists('posix_isatty')) {
357
+
$inputStream = null;
358
+
359
+
if ($inputinstanceof StreamableInputInterface) {
360
+
$inputStream = $input->getStream();
361
+
}
362
+
363
+
if (!@posix_isatty($inputStream) && false === getenv('SHELL_INTERACTIVE')) {
0 commit comments