From 6a259ae0481972763fc0602b6a60348ec8f0e1ef Mon Sep 17 00:00:00 2001 From: Len Woodward Date: Thu, 18 May 2023 08:59:51 -0700 Subject: [PATCH] optionally overwrite whisky.json on install --- app/Commands/Install.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Commands/Install.php b/app/Commands/Install.php index 0afc19d..a41f925 100644 --- a/app/Commands/Install.php +++ b/app/Commands/Install.php @@ -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'),