mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Prompt developer to confirm installing over existing install
This commit is contained in:
@@ -82,6 +82,15 @@ class Install extends Action
|
||||
$data = @file_get_contents($this->path . '/docker-compose.yml');
|
||||
|
||||
if ($data !== false) {
|
||||
if ($interactive == 'Y' && Console::isInteractive()) {
|
||||
$answer = Console::confirm('Previous installation found, do you want to overwrite it? (Y/n)');
|
||||
|
||||
if ($answer !== 'Y') {
|
||||
Console::info('No action taken.');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$time = \time();
|
||||
Console::info('Compose file found, creating backup: docker-compose.yml.' . $time . '.backup');
|
||||
file_put_contents($this->path . '/docker-compose.yml.' . $time . '.backup', $data);
|
||||
|
||||
Reference in New Issue
Block a user