8000 minor #1688 Warn if using a maker non-interactively (kbond) · symfony/maker-bundle@fd1764a · GitHub
[go: up one dir, main page]

Skip to content

Commit fd1764a

Browse files
committed
minor #1688 Warn if using a maker non-interactively (kbond)
This PR was merged into the 1.x branch. Discussion ---------- Warn if using a maker non-interactively Maker's are not meant to be run non-interactively. It's possible (?) some may support this so I opted for a warning instead of an exception. Closes #1678 Commits ------- 2ba853e Warn if using a maker non-interactively
2 parents 13efa7c + 2ba853e commit fd1764a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Command/MakerCommand.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ protected function configure(): void
5656
protected function initialize(InputInterface $input, OutputInterface $output): void
5757
{
5858
$this->io = new ConsoleStyle($input, $output);
59+
60+
if (!$input->isInteractive()) {
61+
$this->io->warning(\sprintf('"%s" is not meant to be run in non-interactive mode.', $this->getName()));
62+
}
63+
5964
$this->fileManager->setIO($this->io);
6065

6166
if ($this->checkDependencies) {

0 commit comments

Comments
 (0)
0