Skip to content

Commit a6cb30a

Browse files
Add keep-config option to install command (#946)
* Add keep-config option * update pr * formatting --------- Co-authored-by: Taylor Otwell <[email protected]>
1 parent d1acd65 commit a6cb30a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/Commands/InstallCommand.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ class InstallCommand extends Command
2222
* @var string
2323
*/
2424
public $signature = 'octane:install
25-
{--server= : The server that should be used to serve the application}';
25+
{--server= : The server that should be used to serve the application}
26+
{--force : Overwrite any existing configuration files}';
2627

2728
/**
2829
* The command's description.
@@ -53,7 +54,10 @@ public function handle()
5354
if ($installed) {
5455
$this->updateEnvironmentFile($server);
5556

56-
$this->callSilent('vendor:publish', ['--tag' => 'octane-config', '--force' => true]);
57+
$this->callSilent('vendor:publish', [
58+
'--tag' => 'octane-config',
59+
'--force' => $this->option('force'),
60+
]);
5761

5862
$this->components->info('Octane installed successfully.');
5963
$this->newLine();
@@ -78,6 +82,7 @@ public function updateEnvironmentFile($server)
7882
PHP_EOL.'OCTANE_SERVER='.$server.PHP_EOL,
7983
);
8084
} else {
85+
$this->newLine();
8186
$this->components->warn('Please adjust the `OCTANE_SERVER` environment variable.');
8287
}
8388
}

0 commit comments

Comments
 (0)