Skip to content

Commit 50b3688

Browse files
committed
Identify site profile directories as site directories for the purpose of modifying the modules install path
1 parent 82415fd commit 50b3688

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.1.0] - 2019-06-22
11+
12+
### Changed
13+
- Identify current directory as a site directory if it appears to be site profile directory waiting to be installed.
14+
1015
## [0.0.5] - 2019-06-16
1116

1217
### Changed

src/ComposerInstaller/BaseInstaller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function supports($packageType)
4545
protected function getBasePath($defaultBasePath) {
4646
// if we're already in the site directory, remove "site/" from the beginning
4747
// of the default base path to avoid creating nested /site/site/ directories
48-
if (basename(\getcwd()) === 'site' && substr($defaultBasePath, 0, 5) === 'site/') {
48+
if (substr($defaultBasePath, 0, 5) === 'site/' && preg_match('/^site(?:-[a-z0-9]+)*$/', basename(getcwd()))) {
4949
$defaultBasePath = substr($defaultBasePath, 5);
5050
}
5151

0 commit comments

Comments
 (0)