mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
Fix when installing multiple packages and one is a dependency of the other
e.g. `bin/gpm install login login-oauth`
This commit is contained in:
parent
a9e31f45e2
commit
400b87fb96
|
|
@ -620,6 +620,11 @@ class GPM extends Iterator
|
|||
public function getDependencies($packages) {
|
||||
$dependencies = $this->calculateMergedDependenciesOfPackages($packages);
|
||||
foreach ($dependencies as $dependency_slug => $dependencyVersionWithOperator) {
|
||||
if (in_array($dependency_slug, $packages)) {
|
||||
unset($dependencies[$dependency_slug]);
|
||||
continue;
|
||||
}
|
||||
|
||||
//First, check for Grav dependency. If a dependency requires Grav > the current version, abort and tell.
|
||||
if ($dependency_slug == 'grav') {
|
||||
if (version_compare($this->calculateVersionNumberFromDependencyVersion($dependencyVersionWithOperator), GRAV_VERSION) === 1) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user