Skip to content

Commit 69b74ad

Browse files
committed
Add missing php.js file
1 parent 1c2f877 commit 69b74ad

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

resources/js/php.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const {copySync} = require("fs-extra");
2+
const {join} = require("path");
3+
const phpBinaryPath = process.env.NATIVEPHP_PHP_BINARY_PATH;
4+
const isArm64 = process.argv.includes('--arm64');
5+
6+
if (phpBinaryPath) {
7+
try {
8+
copySync(join(phpBinaryPath, (isArm64 ? 'arm64' : 'x86'), 'php'), join(__dirname, 'resources', 'php'));
9+
} catch (e) {
10+
console.log('Error copying PHP binary', e);
11+
}
12+
}
13+

0 commit comments

Comments
 (0)