/**
  * {@inheritDoc}
  */
 public function doUpdate(PackageInterface $initial, PackageInterface $target, $path, $url)
 {
     if (!is_dir($path . '/.git')) {
         $this->io->writeError("    Missing .git directory. Don't worry ;)");
         $this->io->writeError("      => See https://github.com/sonata-project/sonata-composer");
         $this->doDownload($initial, $path, $url);
     }
     return parent::doUpdate($initial, $target, $path, $url);
 }
 public function doUpdate(PackageInterface $initial, PackageInterface $target, $path, $url)
 {
     GitUtil::cleanEnv();
     $path = $this->normalizePath($path);
     if (!$this->isRepositoryCloned($path)) {
         //clone the multi repository if it was removed
         $this->io->write('    Multi-repository GIT directory not found. Cloning...');
         $this->cloneRepository($initial, $path, $url);
     }
     parent::doUpdate($initial, $target, $path, $url);
     //copy file into required directory
     $this->copyFilesToDefaultPath($this->normalizePath($path));
 }