Skip to content

Commit d9a2e33

Browse files
committed
fix tests - more resilient vendor directory resolution
1 parent 208822f commit d9a2e33

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Electron/Traits/CopiesCertificateAuthority.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Native\Electron\Traits;
44

5+
use Composer\InstalledVersions;
56
use Native\Electron\ElectronServiceProvider;
67
use Symfony\Component\Filesystem\Path;
78

@@ -16,7 +17,8 @@ protected function copyCertificateAuthorityCertificate(): void
1617
try {
1718
intro('Copying latest CA Certificate...');
1819

19-
$phpBinaryDirectory = base_path('vendor/nativephp/php-bin/');
20+
$vendorDirectory = realpath(InstalledVersions::getRootPackage()['install_path'].'/vendor');
21+
$phpBinaryDirectory = $vendorDirectory.'/nativephp/php-bin/';
2022

2123
$certificateFileName = 'cacert.pem';
2224
$certFilePath = Path::join($phpBinaryDirectory, $certificateFileName);

0 commit comments

Comments
 (0)