@@ -21,6 +21,8 @@ class UpdateCommand extends Command {
2121 protected bool $ shouldStop = false ;
2222 protected bool $ skipBackup = false ;
2323 protected bool $ skipUpgrade = false ;
24+ protected bool $ skipIntegrityCheck = false ;
25+
2426 protected string $ urlOverride = '' ;
2527
2628 /** @var list<string> strings of text for stages of updater */
@@ -47,7 +49,8 @@ protected function configure(): void {
4749 ->setHelp ('This command fetches the latest code that is announced via the updater server and safely replaces the existing code with the new one. ' )
4850 ->addOption ('no-backup ' , null , InputOption::VALUE_NONE , 'Skip backup of current Nextcloud version ' )
4951 ->addOption ('no-upgrade ' , null , InputOption::VALUE_NONE , "Don't automatically run occ upgrade " )
50- ->addOption ('url ' , null , InputOption::VALUE_OPTIONAL , 'The URL of the Nextcloud release to download ' );
52+ ->addOption ('url ' , null , InputOption::VALUE_OPTIONAL , 'The URL of the Nextcloud release to download ' )
53+ ->addOption ('no-verify ' , null , InputOption::VALUE_OPTIONAL , 'Skip integrity verification of the downloaded file ' );
5154 }
5255
5356 public static function getUpdaterVersion (): string {
@@ -62,6 +65,7 @@ public static function getUpdaterVersion(): string {
6265 protected function execute (InputInterface $ input , OutputInterface $ output ) {
6366 $ this ->skipBackup = (bool )$ input ->getOption ('no-backup ' );
6467 $ this ->skipUpgrade = (bool )$ input ->getOption ('no-upgrade ' );
68+ $ this ->skipIntegrityCheck = (bool )$ input ->getOption ('no-verify ' );
6569 $ this ->urlOverride = (string )$ input ->getOption ('url ' );
6670
6771 $ version = static ::getUpdaterVersion ();
@@ -143,6 +147,11 @@ protected function execute(InputInterface $input, OutputInterface $output) {
143147 $ updateString = $ this ->updater ->checkForUpdate ();
144148 }
145149
150+ if ($ this ->skipIntegrityCheck ) {
151+ $ this ->updater ->log ('[warn] Integrity check of the downloaded file will be skipped ' );
152+ $ output ->writeln ('Integrity check of the downloaded file will be skipped. ' );
153+ }
154+
146155 $ output ->writeln ('' );
147156
148157 $ lines = explode ('<br /> ' , $ updateString );
@@ -407,7 +416,11 @@ protected function executeStep(int $step): array {
407416 $ this ->updater ->downloadUpdate ($ this ->urlOverride );
408417 break ;
409418 case 5 :
410- $ this ->updater ->verifyIntegrity ($ this ->urlOverride );
419+ if ($ this ->skipIntegrityCheck ) {
420+ $ this ->updater ->silentLog ('[info] Skipping integrity check as requested ' );
421+ break ;
422+ }
423+ $ this ->updater ->verifyIntegrity ();
411424 break ;
412425 case 6 :
413426 $ this ->updater ->extractDownload ();
0 commit comments