From 43cf565f8ff03a4a6fa3e950d0678163e6e47b43 Mon Sep 17 00:00:00 2001 From: Richard Dern Date: Wed, 8 May 2024 15:15:14 +0200 Subject: [PATCH] Allow to deploy without asking --- app/Console/Commands/Bundle/Render.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/Console/Commands/Bundle/Render.php b/app/Console/Commands/Bundle/Render.php index ae5c957..01ecc25 100644 --- a/app/Console/Commands/Bundle/Render.php +++ b/app/Console/Commands/Bundle/Render.php @@ -30,6 +30,7 @@ public function __construct() $this->signature = 'bundle:render { --a|assets : Rebuild assets - implies -c } { --c|clear-cache : Clear cache before rendering } + { --deploy : Deploy without asking } { --d|dry-run : Show what would be done but do nothing } { --no-deploy : Do not deploy, do not ask to deploy } { --r|recursive : Also render sub-bundles } @@ -213,11 +214,13 @@ private function deploy() return; } - // Ask for confirmation - if (!confirm('Ready to deploy?')) { - $this->comment('OK, not deploying!'); + if (!$this->option('deploy')) { + // Ask for confirmation + if (!confirm('Ready to deploy?')) { + $this->comment('OK, not deploying!'); - return; + return; + } } $source = Str::finish($this->targetDisk->path('/'), '/');