Skip to content

Commit

Permalink
optionally overwrite whisky.json on install
Browse files Browse the repository at this point in the history
  • Loading branch information
ProjektGopher committed May 18, 2023
1 parent 94d7e62 commit 6a259ae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/Commands/Install.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ public function handle(): int
return Command::FAILURE;
}

if (! File::exists(Whisky::cwd('whisky.json'))) {
if (
! File::exists(Whisky::cwd('whisky.json')) ||
$this->ask('overwrite existing whisky.json?', 'no')
) {
$this->info('Creating whisky.json in project root...');
File::put(
Whisky::cwd('whisky.json'),
Expand Down

0 comments on commit 6a259ae

Please sign in to comment.