From 126ca98252eb3f5cb5c8cbdc3ffe9f4d705acae7 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Thu, 18 Aug 2016 14:02:36 -0600 Subject: [PATCH] tidying up --- system/src/Grav/Console/Gpm/SelfupgradeCommand.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/system/src/Grav/Console/Gpm/SelfupgradeCommand.php b/system/src/Grav/Console/Gpm/SelfupgradeCommand.php index b943789db..81ed906c3 100644 --- a/system/src/Grav/Console/Gpm/SelfupgradeCommand.php +++ b/system/src/Grav/Console/Gpm/SelfupgradeCommand.php @@ -49,6 +49,8 @@ class SelfupgradeCommand extends ConsoleCommand */ private $upgrader; + protected $all_yes; + /** * */ @@ -79,6 +81,7 @@ class SelfupgradeCommand extends ConsoleCommand protected function serve() { $this->upgrader = new Upgrader($this->input->getOption('force')); + $this->all_yes = $this->input->getOption('all-yes'); $this->displayGPMRelease(); @@ -109,12 +112,12 @@ class SelfupgradeCommand extends ConsoleCommand new ArrayInput([]); $questionHelper = $this->getHelper('question'); - $skipPrompt = $this->input->getOption('all-yes'); + $this->output->writeln("Grav v$remote is now available [release date: $release]."); $this->output->writeln("You are currently using v" . GRAV_VERSION . "."); - if (!$skipPrompt) { + if (!$this->all_yes) { $question = new ConfirmationQuestion("Would you like to read the changelog before proceeding? [y|N] ", false); $answer = $questionHelper->ask($this->input, $this->output, $question);