فهرست منبع

Merge remote-tracking branch 'fduch/fix-dumper-lock-release'

Jordi Boggiano 9 سال پیش
والد
کامیت
65768e2555
1فایلهای تغییر یافته به همراه5 افزوده شده و 2 حذف شده
  1. 5 2
      src/Packagist/WebBundle/Command/DumpPackagesCommand.php

+ 5 - 2
src/Packagist/WebBundle/Command/DumpPackagesCommand.php

@@ -86,8 +86,11 @@ class DumpPackagesCommand extends ContainerAwareCommand
             return;
         }
 
-        $result = $this->getContainer()->get('packagist.package_dumper')->dump($ids, $force, $verbose);
-        $lock->release();
+        try {
+             $result = $this->getContainer()->get('packagist.package_dumper')->dump($ids, $force, $verbose);
+        } finally {
+             $lock->release();
+        }
 
         return $result ? 0 : 1;
     }