Example #1
0
 /**
  * Handles the "puli map --delete" command.
  *
  * @param Args $args The console arguments.
  *
  * @return int The status code.
  */
 public function handleDelete(Args $args)
 {
     $repositoryPath = Path::makeAbsolute($args->getArgument('path'), $this->currentPath);
     if (!$this->repoManager->hasRootPathMapping($repositoryPath)) {
         throw new RuntimeException(sprintf('The path "%s" is not mapped in the package "%s".', $repositoryPath, $this->packages->getRootPackageName()));
     }
     $this->repoManager->removeRootPathMapping($repositoryPath);
     return 0;
 }