Skip to content

Commit

Permalink
Add keep-config option
Browse files Browse the repository at this point in the history
  • Loading branch information
MatusBoa committed Sep 10, 2024
1 parent d1acd65 commit f381ab8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Commands/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ class InstallCommand extends Command
* @var string
*/
public $signature = 'octane:install
{--server= : The server that should be used to serve the application}';
{--server= : The server that should be used to serve the application}
{--keep-config : Do not overwrite the existing configuration}';

/**
* The command's description.
Expand Down Expand Up @@ -53,7 +54,10 @@ public function handle()
if ($installed) {
$this->updateEnvironmentFile($server);

$this->callSilent('vendor:publish', ['--tag' => 'octane-config', '--force' => true]);
$this->callSilent('vendor:publish', [
'--tag' => 'octane-config',
'--force' => ! $this->option('keep-config'),
]);

$this->components->info('Octane installed successfully.');
$this->newLine();
Expand Down

0 comments on commit f381ab8

Please sign in to comment.