diff --git a/src/applications/repository/storage/PhabricatorRepository.php b/src/applications/repository/storage/PhabricatorRepository.php index 498310e28f..9ee576dfb2 100644 --- a/src/applications/repository/storage/PhabricatorRepository.php +++ b/src/applications/repository/storage/PhabricatorRepository.php @@ -2375,6 +2375,11 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO * @task sync */ public function synchronizeWorkingCopyAfterWrite() { + $device = AlmanacKeys::getLiveDevice(); + if (!$device) { + return; + } + if (!$this->clusterWriteLock) { throw new Exception( pht( @@ -2382,14 +2387,6 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO 'lock!')); } - $device = AlmanacKeys::getLiveDevice(); - if (!$device) { - throw new Exception( - pht( - 'Trying to synchronize after write, but this host is not an '. - 'Almanac device.')); - } - $repository_phid = $this->getPHID(); $device_phid = $device->getPHID();