Skip to content

Commit

Permalink
Merge pull request #13 from grasmash/add-require
Browse files Browse the repository at this point in the history
Make --exact-versions work with dev modules.
  • Loading branch information
grasmash committed Jan 17, 2019
2 parents e563501 + ac619a5 commit 24e1c3c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
1 change: 1 addition & 0 deletions composer.json
Expand Up @@ -3,6 +3,7 @@
"description": "Convert a non-Composer managed Drupal application into a Composer-managed application.",
"type": "composer-plugin",
"require": {
"php": ">=5.6",
"composer-plugin-api": "^1.0.0",
"symfony/finder": "^3.4",
"symfony/yaml": "^3.4",
Expand Down
12 changes: 4 additions & 8 deletions src/Composer/ComposerizeDrupalCommand.php
Expand Up @@ -330,17 +330,13 @@ protected function removeAllComposerFiles()
*/
protected function getVersionConstraint($version)
{
if ($this->input->getOption('exact-versions')) {
return $version;
}

if ($version == null) {
$version_constraint = "*";
return "*";
} elseif ($this->input->getOption('exact-versions')) {
return $version;
} else {
$version_constraint = "^" . $version;
return "^" . $version;
}

return $version_constraint;
}

protected function printPostScript()
Expand Down

0 comments on commit 24e1c3c

Please sign in to comment.