Skip to content

Commit 76d9b25

Browse files
committed
Update CompileBinaryCommand.php
1 parent dd23a6f commit 76d9b25

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Diff for: app/Commands/CompileBinaryCommand.php

+7-2
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,20 @@ public function handle(): void
7878

7979
collect([
8080
base_path('php-parser') . " app:build --build-version={$version}",
81-
sprintf('%s download --with-php=8.2 --for-extensions="%s"', $spc, $extensions),
82-
sprintf('%s build --build-micro --build-cli "%s"', $spc, $extensions),
81+
sprintf('%s download --with-php=8.2 --for-extensions="%s" --prefer-pre-built', $spc, $extensions),
82+
sprintf('%s doctor --auto-fix', $spc),
83+
sprintf('%s build --build-micro "%s"', $spc, $extensions),
8384
sprintf('%s micro:combine %s -O %s', $spc, base_path('builds/php-parser'), $destination),
8485
])->each(function (string $command) use ($timeout) {
8586
Process::timeout($timeout)->run($command, function (string $type, string $output) {
8687
echo $output;
8788
});
8889
});
8990

91+
if (!file_exists($destination)) {
92+
throw new \Exception('Error during compilation');
93+
}
94+
9095
if (file_exists(base_path('.env.bak'))) {
9196
exec('mv ' . base_path('.env.bak') . ' ' . base_path('.env'));
9297
}

0 commit comments

Comments
 (0)