mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-10 08:52:39 +01:00
Avoid infinite loop in 'arc unit'
Summary: If you modify a file at the root level (like the celerity map) we run the dir/path checks in the wrong order and fail to detect that we can't possibly find any modules. This leads to an infinite loop inside the while loop below. Test Plan: Ran "arc unit" on a change which affects the celerity map. Reviewers: btrahan Reviewed By: btrahan CC: aran, btrahan Differential Revision: 1146
This commit is contained in:
parent
3f8c37fe7e
commit
99717090ef
1 changed files with 4 additions and 3 deletions
|
@ -36,14 +36,15 @@ class PhutilUnitTestEngine extends ArcanistBaseUnitTestEngine {
|
|||
$library_name = phutil_get_library_name_for_root($library_root);
|
||||
|
||||
$path = Filesystem::resolvePath($path);
|
||||
if ($path == $library_root) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!is_dir($path)) {
|
||||
$path = dirname($path);
|
||||
}
|
||||
|
||||
if ($path == $library_root) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$library_path = Filesystem::readablePath($path, $library_root);
|
||||
do {
|
||||
// Add the module and all parent modules as affected modules, which
|
||||
|
|
Loading…
Reference in a new issue