Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinDev committed Nov 16, 2021
1 parent 1863373 commit 1fff47f
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/admin-block-editor/install.php
Expand Up @@ -4,7 +4,7 @@
* Execute via Pushword\Installer\PostInstall::postUpdateCommand
*/

if (! \Pushword\Installer\PostInstall::isRoot()) {
if (!isset($postInstallRunning)) return;if (! \Pushword\Installer\PostInstall::isRoot()) {
throw new Exception('installer mus be run from root');
}

Expand Down
3 changes: 3 additions & 0 deletions packages/admin/src/Installer/install.php
Expand Up @@ -3,6 +3,9 @@
/**
* Execute via Pushword\Installer\PostInstall::postUpdateCommand.
*/
if (! isset($postInstallRunning)) {
return;
}
if (! \Pushword\Installer\PostInstall::isRoot()) {
throw new Exception('installer mus be run from root');
}
Expand Down
3 changes: 3 additions & 0 deletions packages/conversation/src/Installer/install.php
Expand Up @@ -3,6 +3,9 @@
/**
* Execute via Pushword\Installer\PostInstall::postUpdateCommand.
*/
if (! isset($postInstallRunning)) {
return;
}
if (! \Pushword\Installer\PostInstall::isRoot()) {
throw new Exception('installer mus be run from root');
}
Expand Down
5 changes: 4 additions & 1 deletion packages/core/src/Installer/install.php
Expand Up @@ -3,7 +3,10 @@
/**
* Execute via Pushword\Installer\PostInstall::postUpdateCommand.
*/
if (! file_exists('vendor')) {
if (! isset($postInstallRunning)) {
return;
}
if (! \Pushword\Installer\PostInstall::isRoot()) {
throw new Exception('installer mus be run from root');
}

Expand Down
1 change: 1 addition & 0 deletions packages/installer/src/PostInstall.php
Expand Up @@ -20,6 +20,7 @@ public static function run(): void //Event $event
foreach ($packages as $package) {
if (! file_exists('var/installer/'.md5($package)) && file_exists($installer = 'vendor/pushword/'.$package.'/src/Installer/install.php')) {
echo '~ Executing '.$package.' post update command install action.'.\chr(10);
$postInstallRunning = true;
include $installer;

self::dumpFile('var/installer/'.md5($package), 'done');
Expand Down
3 changes: 3 additions & 0 deletions packages/page-scanner/src/Installer/install.php
Expand Up @@ -3,6 +3,9 @@
/**
* Execute via Pushword\Installer\PostInstall::postUpdateCommand.
*/
if (! isset($postInstallRunning)) {
return;
}
if (! \Pushword\Installer\PostInstall::isRoot()) {
throw new Exception('installer mus be run from root');
}
Expand Down
2 changes: 1 addition & 1 deletion packages/static-generator/install.php
Expand Up @@ -4,7 +4,7 @@
* Execute via Pushword\Installer\PostInstall::postUpdateCommand
*/

if (! \Pushword\Installer\PostInstall::isRoot()) {
if (!isset($postInstallRunning)) return;if (! \Pushword\Installer\PostInstall::isRoot()) {
throw new Exception('installer mus be run from root');
}

Expand Down
3 changes: 3 additions & 0 deletions packages/template-editor/src/install.php
Expand Up @@ -3,6 +3,9 @@
/**
* Execute via Pushword\Installer\PostInstall::postUpdateCommand.
*/
if (! isset($postInstallRunning)) {
return;
}
if (! \Pushword\Installer\PostInstall::isRoot()) {
throw new Exception('installer mus be run from root');
}
Expand Down
3 changes: 3 additions & 0 deletions packages/version/src/Installer/install.php
Expand Up @@ -3,6 +3,9 @@
/**
* Execute via Pushword\Installer\PostInstall::postUpdateCommand.
*/
if (! isset($postInstallRunning)) {
return;
}
if (! \Pushword\Installer\PostInstall::isRoot()) {
throw new Exception('installer mus be run from root');
}
Expand Down

0 comments on commit 1fff47f

Please sign in to comment.