Skip to content

Commit f3ea8a9

Browse files
committed
fix - depth detection issue
1 parent f3cbe4a commit f3ea8a9

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/Concerns/DetectsConfigFile.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ private function detectConfig(string $root = __DIR__): ?string
1212
$finder->files()
1313
->in($root)
1414
->exclude(['vendor', 'tests'])
15-
->name('phpacker.json')
16-
->depth('<= 3');
15+
->name('phpacker.json');
1716

1817
// If the package we're installing is phpacker itself, ignore it's internal config file.
1918
if (substr($root, -strlen('phpacker/phpacker')) === 'phpacker/phpacker') {
2019
$finder->notPath('config/phpacker.json');
2120
}
2221

22+
// Just return the first
2323
foreach ($finder as $file) {
2424
return $file->getRealPath();
2525
}

src/ExecutableInstaller.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ public function installBinaries(PackageInterface $package, string $installPath,
2828

2929
$executable = $this->getExecutable($installPath);
3030

31+
if (! $executable) {
32+
// Something went wrong in getExecutabe. Warning already triggered there.
33+
return;
34+
}
35+
3136
[$platform, $arch] = self::detectPlatformAndArchitecture();
3237

3338
// Override default behaviour

0 commit comments

Comments
 (0)