mirror of
https://github.com/getgrav/grav.git
synced 2026-06-19 21:40:45 +02:00
Removed redundant existing check
This commit is contained in:
@@ -217,8 +217,8 @@ class InstallCommand extends ConsoleCommand
|
||||
}
|
||||
} else {
|
||||
if (Installer::lastErrorCode() == Installer::IS_LINK) {
|
||||
$this->output->writeln("<red>Cannot overwrite existing symlink</red>");
|
||||
return false;
|
||||
$this->output->writeln("<red>Cannot overwrite existing symlink for </red><cyan>$package_name</cyan>");
|
||||
$this->output->writeln("");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -576,22 +576,6 @@ class InstallCommand extends ConsoleCommand
|
||||
|
||||
Installer::isValidDestination($this->destination . DS . $package->install_path);
|
||||
|
||||
if (Installer::lastErrorCode() == Installer::EXISTS) {
|
||||
|
||||
$this->output->write("\x0D");
|
||||
$this->output->writeln(" |- Checking destination... <yellow>exists</yellow>");
|
||||
|
||||
$question = new ConfirmationQuestion(" | '- The package is already installed, do you want to overwrite it? [y|N] ",
|
||||
false);
|
||||
$answer = $this->all_yes ? true : $question_helper->ask($this->input, $this->output, $question);
|
||||
|
||||
if (!$answer) {
|
||||
$this->output->writeln(" | '- <red>You decided to not overwrite the already installed package.</red>");
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (Installer::lastErrorCode() == Installer::IS_LINK) {
|
||||
$this->output->write("\x0D");
|
||||
$this->output->writeln(" |- Checking destination... <yellow>symbolic link</yellow>");
|
||||
|
||||
Reference in New Issue
Block a user