Skip to content

Commit

Permalink
Merge pull request #33 from craftcms/feature/craft_cloud_build
Browse files Browse the repository at this point in the history
Fail early if ephemeral
  • Loading branch information
timkelty authored Mar 1, 2024
2 parents ee78c83 + ab43030 commit 36408bc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/cli/controllers/AssetBundlesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use craft\console\Controller;
use craft\helpers\App;
use ReflectionClass;
use yii\console\Exception;
use yii\console\ExitCode;
use yii\web\AssetBundle;

Expand All @@ -26,6 +27,10 @@ public function init(): void

public function beforeAction($action): bool
{
if (App::isEphemeral()) {
throw new Exception('Asset bundle publishing is not supported in ephemeral environments.');
}

if (App::env('CRAFT_NO_DB')) {
Composer::getModuleAliases()
->merge(Composer::getPluginAliases())
Expand Down

0 comments on commit 36408bc

Please sign in to comment.