mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-10 00:42:40 +01:00
Fix PhutilUnitTest issue with symlinks that point into a libphutil library
Summary: Currently, if you change a symlink outside a libphutil library and the link target is something inside a libphutil library, we may enter an inifite loop in the "do { ... } while(...)" later. Just bail if the loop won't resolve. Test Plan: Ran arc unit, Airtime reported the issue resolved by a similar fix. Reviewers: cpiro, btrahan Reviewed By: cpiro CC: aran Differential Revision: https://secure.phabricator.com/D2318
This commit is contained in:
parent
946a9e44a3
commit
dd11fee5ef
1 changed files with 8 additions and 0 deletions
|
@ -57,6 +57,14 @@ final class PhutilUnitTestEngine extends ArcanistBaseUnitTestEngine {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!Filesystem::isDescendant($path, $library_root)) {
|
||||||
|
// We have encountered some kind of symlink maze -- for instance, $path
|
||||||
|
// is some symlink living outside the library that links into some file
|
||||||
|
// inside the library. Just ignore these cases, since the affected file
|
||||||
|
// does not actually lie within the library.
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$library_path = Filesystem::readablePath($path, $library_root);
|
$library_path = Filesystem::readablePath($path, $library_root);
|
||||||
do {
|
do {
|
||||||
// Add the module and all parent modules as affected modules, which
|
// Add the module and all parent modules as affected modules, which
|
||||||
|
|
Loading…
Reference in a new issue