@@ -28,6 +28,8 @@ class UpdateCommand extends Command {
2828
2929 protected bool $ ignoreState = false ;
3030
31+ protected bool $ skipIntegrityCheck = false ;
32+
3133 protected string $ urlOverride = '' ;
3234
3335 /** Strings of text for stages of updater */
@@ -57,6 +59,7 @@ protected function configure(): void {
5759 ->addOption ('no-upgrade ' , null , InputOption::VALUE_NONE , "Don't automatically run occ upgrade " )
5860 ->addOption ('url ' , null , InputOption::VALUE_OPTIONAL , 'The URL of the Nextcloud release to download ' )
5961 ->addOption ('ignore-state ' , null , InputOption::VALUE_NONE , 'Ignore known state from .step file, do a complete update ' )
62+ ->addOption ('no-verify ' , null , InputOption::VALUE_OPTIONAL , 'Skip integrity verification of the downloaded file ' )
6063 ;
6164 }
6265
@@ -73,6 +76,7 @@ public static function getUpdaterVersion(): string {
7376 protected function execute (InputInterface $ input , OutputInterface $ output ): int {
7477 $ this ->skipBackup = (bool )$ input ->getOption ('no-backup ' );
7578 $ this ->skipUpgrade = (bool )$ input ->getOption ('no-upgrade ' );
79+ $ this ->skipIntegrityCheck = (bool )$ input ->getOption ('no-verify ' );
7680 $ this ->urlOverride = (string )$ input ->getOption ('url ' );
7781 $ this ->ignoreState = (bool )$ input ->getOption ('ignore-state ' );
7882
@@ -166,6 +170,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int
166170 $ updateString = $ this ->updater ->checkForUpdate ();
167171 }
168172
173+ if ($ this ->skipIntegrityCheck ) {
174+ $ this ->updater ->log ('[warn] Integrity check of the downloaded file will be skipped ' );
175+ $ output ->writeln ('Integrity check of the downloaded file will be skipped. ' );
176+ }
177+
169178 $ output ->writeln ('' );
170179
171180 $ lines = explode ('<br /> ' , $ updateString );
@@ -450,7 +459,11 @@ protected function executeStep(int $step, OutputInterface $output): array {
450459 });
451460 break ;
452461 case 5 :
453- $ this ->updater ->verifyIntegrity ($ this ->urlOverride );
462+ if ($ this ->skipIntegrityCheck ) {
463+ $ this ->updater ->silentLog ('[info] Skipping integrity check as requested ' );
464+ break ;
465+ }
466+ $ this ->updater ->verifyIntegrity ();
454467 break ;
455468 case 6 :
456469 $ this ->updater ->extractDownload ();
0 commit comments