From 104012228c8b59769ea24be6bded679d4830fb87 Mon Sep 17 00:00:00 2001 From: Flavio Copes Date: Mon, 28 Dec 2015 18:22:16 +0100 Subject: [PATCH] Command line GPM: Avoid prompting to reinstall already installed packages --- system/src/Grav/Console/Gpm/InstallCommand.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/system/src/Grav/Console/Gpm/InstallCommand.php b/system/src/Grav/Console/Gpm/InstallCommand.php index dca4fe77b..f6f24d949 100644 --- a/system/src/Grav/Console/Gpm/InstallCommand.php +++ b/system/src/Grav/Console/Gpm/InstallCommand.php @@ -139,8 +139,11 @@ class InstallCommand extends ConsoleCommand foreach($dependency_data as $type => $dep_data) { foreach($dep_data as $name => $dep_package) { - - $this->processPackage($dep_package); + Installer::isValidDestination($this->destination . DS . $dep_package->install_path); + $error_code = Installer::lastErrorCode(); + if (!$error_code) { + $this->processPackage($dep_package); + } } } }