mirror of
https://gitcode.com/github-mirrors/react-native-update-cli.git
synced 2025-09-16 09:41:38 +08:00
fix: hermes path
This commit is contained in:
@@ -196,22 +196,15 @@ async function compileHermesByteCode(
|
|||||||
paths: [process.cwd()],
|
paths: [process.cwd()],
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
let hermesCommand = path.join(
|
let hermesPath = path.join(rnDir, `/sdks/hermesc/${getHermesOSBin()}`);
|
||||||
rnDir,
|
|
||||||
`/sdks/hermesc/${getHermesOSBin()}/hermesc`,
|
|
||||||
);
|
|
||||||
|
|
||||||
// < rn 0.69
|
// < rn 0.69
|
||||||
if (!fs.existsSync(hermesCommand)) {
|
if (!fs.existsSync(hermesPath)) {
|
||||||
const hermesPackage = fs.existsSync('node_modules/hermes-engine')
|
hermesPath = `node_modules/hermes-engine/${getHermesOSBin()}`;
|
||||||
? 'node_modules/hermes-engine' // 0.2+
|
|
||||||
: 'node_modules/hermesvm'; // < 0.2
|
|
||||||
const hermesPath = `${hermesPackage}/${getHermesOSBin()}`;
|
|
||||||
|
|
||||||
hermesCommand = fs.existsSync(`${hermesPath}/hermesc`)
|
|
||||||
? `${hermesPath}/hermesc` // 0.5+
|
|
||||||
: `${hermesPath}/hermes`; // < 0.5
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const hermesCommand = `${hermesPath}/hermesc`;
|
||||||
|
|
||||||
const args = [
|
const args = [
|
||||||
'-emit-binary',
|
'-emit-binary',
|
||||||
'-out',
|
'-out',
|
||||||
|
Reference in New Issue
Block a user