projects
/
pharext
/
pharext
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
support for positional args
[pharext/pharext]
/
src
/
pharext
/
Task
/
PeclFixup.php
diff --git
a/src/pharext/Task/PeclFixup.php
b/src/pharext/Task/PeclFixup.php
index b237771055c51cf344d9397caa26591c0cf5ea56..33eb889c7900744e5350862a271f83cb26b6df29 100644
(file)
--- a/
src/pharext/Task/PeclFixup.php
+++ b/
src/pharext/Task/PeclFixup.php
@@
-33,8
+33,11
@@
class PeclFixup implements Task
}
$dirs = glob("{$this->source}/*", GLOB_ONLYDIR);
$files = array_diff(glob("{$this->source}/*"), $dirs);
}
$dirs = glob("{$this->source}/*", GLOB_ONLYDIR);
$files = array_diff(glob("{$this->source}/*"), $dirs);
+ $check = array_reduce($files, function($r, $v) {
+ return $v && fnmatch("package*.xml", basename($v));
+ }, true);
- if (count($dirs) !== 1 || !
count($files)
) {
+ if (count($dirs) !== 1 || !
$check
) {
throw new Exception("Does not look like an extracted PECL dir: {$this->source}");
}
throw new Exception("Does not look like an extracted PECL dir: {$this->source}");
}