RequirementsValidator::validate();
(new ProgramRunner('mysql', '/usr/bin/mysql'))->ensureFound();
- $zipPath = realpath($input->getArgument('backup-zip'));
+ $providedZipPath = $input->getArgument('backup-zip');
+ $zipPath = realpath($providedZipPath);
+ if (!$zipPath || !file_exists($zipPath)) {
+ $pathToDisplay = $zipPath ?: $providedZipPath;
+ throw new CommandError("Could not find ZIP file for restoration at provided path [{$pathToDisplay}].");
+ }
+
$zip = new BackupZip($zipPath);
$contents = $zip->getContentsOverview();