Skip to content

Commit

Permalink
do not download when licence is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
antedebaas committed Oct 27, 2024
1 parent ae2a9e8 commit b8397f8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Command/UpdateDatabaseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int

$io->section(sprintf('Update "%s" database', $database));

$this->downloader->download($this->databases[$database]['url'], $this->databases[$database]['path']);
if (empty($this->databases[$database]['license'])) {
$io->warning(sprintf('`GeoIP Database %s has no maxmind license key', $database));
} else {
$this->downloader->download($this->databases[$database]['url'], $this->databases[$database]['path']);
}

$io->comment(sprintf('Database <info>%s</info> updated', $database));
}
Expand Down

0 comments on commit b8397f8

Please sign in to comment.