浏览代码

Throw a RuntimeException when glob braces are used but not supported by the OS

Markus Staab 6 年之前
父节点
当前提交
70a1a6e510
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/Composer/Repository/PathRepository.php

+ 2 - 0
src/Composer/Repository/PathRepository.php

@@ -178,6 +178,8 @@ class PathRepository extends ArrayRepository implements ConfigurableRepositoryIn
         
         if (defined('GLOB_BRACE')) {
             $flags |= GLOB_BRACE;
+        } elseif (strpos($this->url, '{') !== false || strpos($this->url, '}') !== false) {
+            throw new \RuntimeException('The operating system does not support GLOB_BRACE which is required for the url '. $this->url);
         }
         
         // Ensure environment-specific path separators are normalized to URL separators