From 817fae5955d2e8f99ef3f5becb218544a7b301ba Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Thu, 18 Aug 2016 16:03:50 -0600 Subject: [PATCH] Removed redundant existing check --- .../src/Grav/Console/Gpm/InstallCommand.php | 20 ++----------------- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/system/src/Grav/Console/Gpm/InstallCommand.php b/system/src/Grav/Console/Gpm/InstallCommand.php index 29dcf3672..8d75f50eb 100644 --- a/system/src/Grav/Console/Gpm/InstallCommand.php +++ b/system/src/Grav/Console/Gpm/InstallCommand.php @@ -217,8 +217,8 @@ class InstallCommand extends ConsoleCommand } } else { if (Installer::lastErrorCode() == Installer::IS_LINK) { - $this->output->writeln("Cannot overwrite existing symlink"); - return false; + $this->output->writeln("Cannot overwrite existing symlink for $package_name"); + $this->output->writeln(""); } } } @@ -576,22 +576,6 @@ class InstallCommand extends ConsoleCommand Installer::isValidDestination($this->destination . DS . $package->install_path); - if (Installer::lastErrorCode() == Installer::EXISTS) { - - $this->output->write("\x0D"); - $this->output->writeln(" |- Checking destination... exists"); - - $question = new ConfirmationQuestion(" | '- The package is already installed, do you want to overwrite it? [y|N] ", - false); - $answer = $this->all_yes ? true : $question_helper->ask($this->input, $this->output, $question); - - if (!$answer) { - $this->output->writeln(" | '- You decided to not overwrite the already installed package."); - - return false; - } - } - if (Installer::lastErrorCode() == Installer::IS_LINK) { $this->output->write("\x0D"); $this->output->writeln(" |- Checking destination... symbolic link");