From 703629421d8cb3580165cb04e2b298f1b8ff8b78 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sat, 10 Sep 2022 10:50:18 +0200 Subject: [PATCH] Added new --no-config option to GetBinaryCommand, to skip generating the config even in non-interactive mode --- src/GetBinaryCommand.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/GetBinaryCommand.php b/src/GetBinaryCommand.php index 23bf2f0..e1a8e1c 100644 --- a/src/GetBinaryCommand.php +++ b/src/GetBinaryCommand.php @@ -93,6 +93,13 @@ protected function configure(): void InputOption::VALUE_OPTIONAL, 'Generate configuration with plugins in a selected preset.' ); + + $this->addOption( + 'no-config', + null, + InputOption::VALUE_NONE, + 'Do not generate configuration at all.' + ); } /** @@ -227,7 +234,7 @@ private function installConfig(string $to, InputInterface $in, StyleInterface $i return false; } - if (! $io->confirm('Do you want create default ".rr.yaml" configuration file?', true)) { + if ($in->getOption('no-config') || ! $io->confirm('Do you want create default ".rr.yaml" configuration file?', true)) { return false; }