Skip to content

Commit

Permalink
add silent mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Gaal committed Aug 11, 2022
1 parent 9f739e7 commit 252b5c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/Commands/ExecuteCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class ExecuteCommand extends Command
{
protected $signature = 'execute {alias?} {parameters?*}';
protected $signature = 'execute {alias?} {parameters?*} {-s|--silent=false}';

protected $description = 'Executes an alias.';

Expand All @@ -17,7 +17,7 @@ class ExecuteCommand extends Command
public function handle()
{
$alias = $this->argument('alias');
$quiet = $this->option('quiet') ?? false;
$silent = $this->option('silent') ?? false;
$parameters = $this->argument('parameters');

try {
Expand Down Expand Up @@ -46,7 +46,7 @@ public function handle()
);
}

if ($quiet) {
if ($silent) {
@shell_exec($task);
} else {
$this->components->info(shell_exec($task));
Expand Down

0 comments on commit 252b5c2

Please sign in to comment.