protected function findInstalledVersion($recipe)
    {
        // Check locker
        $installed = $this->getComposer()->getLocker()->getLockedRepository()->findPackage($recipe, '*');
        if ($installed) {
            return $installed->getPrettyVersion();
        }

        // Check provides
        $provides = $this->getComposer()->getPackage()->getProvides();
        if (isset($provides[$recipe])) {
            return $provides[$recipe]->getPrettyConstraint();
        }

        // Check requires
        $requires = $this->getComposer()->getPackage()->getRequires();
        if (isset($requires[$recipe])) {
            return $requires[$recipe]->getPrettyConstraint();
        }

        // No existing version
        return null;
    }