Skip to content

Commit 4ed3e87

Browse files
committed
Issue #25: Check if Composer root path exist in Statistics and fix typo
1 parent 7124a65 commit 4ed3e87

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Installer.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ public function createAssetSymlinks() {
370370
}
371371

372372
/**
373-
* Create a PHP stub file at we directory.
373+
* Create a PHP stub file at web directory.
374374
*
375375
* @param string $path
376376
* The PHP file from the app directory.
@@ -486,6 +486,10 @@ protected function getModulePath(string $module): ?string {
486486
protected function getStatisticsPath(): void {
487487
$composerRoot = $this->getComposerRoot();
488488
$fs = new SymfonyFilesystem();
489+
if (!$fs->exists($composerRoot)) {
490+
$this->io->writeError('Composer root path not found');
491+
return;
492+
}
489493
$statisticsPath = $this->getModulePath('statistics');
490494
$statisticsCorePath = 'core/modules/statistics/statistics.php';
491495

0 commit comments

Comments
 (0)