Skip to content
This repository has been archived by the owner on Apr 7, 2024. It is now read-only.

Commit

Permalink
Allow installation from existing config (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
thierrydallacroce authored Apr 24, 2020
1 parent a0ea673 commit 0fb8c68
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/Command/BasicCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ private function downloadFrontend()
return $result;
}

public function install($opts = ['frontend' => false])
private function standardInstallation()
{
$result = $this->taskExec('drush si standard -y')
->dir(Util::getProjectDocroot())
Expand All @@ -251,8 +251,19 @@ public function install($opts = ['frontend' => false])
$result = $this->taskExec('drush config-set system.site page.front "//dkan/home" -y')
->dir(Util::getProjectDocroot())
->run();
}

if ($opts['frontend'] === true) {
public function install($opts = ['frontend' => false, 'existing-config' => false])
{
if ($opts['existing-config']) {
$result = $this->taskExec('drush si -y --existing-config')
->dir(Util::getProjectDocroot())
->run();
} else {
$this->standardInstallation();
}

if ($opts['frontend']) {
$result = $this->taskExec('drush en -y')
->arg('dkan_frontend')
->dir(Util::getProjectDocroot())
Expand All @@ -261,6 +272,8 @@ public function install($opts = ['frontend' => false])
return $result;
}



/**
* Proxy to the phpunit binary.
*
Expand Down

0 comments on commit 0fb8c68

Please sign in to comment.