瀏覽代碼

Added test if proc_open function is enabled in RootPackageLoader

Martin Hasoň 12 年之前
父節點
當前提交
09f774c705
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Composer/Package/Loader/RootPackageLoader.php

+ 1 - 1
src/Composer/Package/Loader/RootPackageLoader.php

@@ -157,7 +157,7 @@ class RootPackageLoader extends ArrayLoader
     private function guessVersion(array $config)
     {
         // try to fetch current version from git branch
-        if (0 === $this->process->execute('git branch --no-color --no-abbrev -v', $output)) {
+        if (function_exists('proc_open') && 0 === $this->process->execute('git branch --no-color --no-abbrev -v', $output)) {
             $branches = array();
             $isFeatureBranch = true;
             $version = null;