Skip to content

Commit f58fdca

Browse files
committed
Copy JSI headers unconditionally
1 parent a7702b4 commit f58fdca

File tree

1 file changed

+17
-18
lines changed

1 file changed

+17
-18
lines changed

packages/host/src/node/cli/hermes.ts

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -77,24 +77,23 @@ export const command = new Command("vendor-hermes")
7777
"ReactCommon/jsi/jsi/"
7878
);
7979

80-
if (
81-
fs.existsSync(reactNativeJsiPath) &&
82-
(force ||
83-
getLatestMtime(hermesJsiPath) > getLatestMtime(reactNativeJsiPath))
84-
) {
85-
await oraPromise(
86-
fs.promises.cp(hermesJsiPath, reactNativeJsiPath, {
87-
recursive: true,
88-
}),
89-
{
90-
text: `Copying JSI from Hermes to React Native`,
91-
successText: "Copied JSI from Hermes to React Native",
92-
failText: (err) =>
93-
`Failed to copy JSI from Hermes to React Native: ${err.message}`,
94-
isEnabled: !silent,
95-
}
96-
);
97-
}
80+
assert(
81+
fs.existsSync(hermesJsiPath),
82+
`Hermes JSI path does not exist: ${hermesJsiPath}`
83+
);
84+
85+
await oraPromise(
86+
fs.promises.cp(hermesJsiPath, reactNativeJsiPath, {
87+
recursive: true,
88+
}),
89+
{
90+
text: `Copying JSI from patched Hermes to React Native`,
91+
successText: "Copied JSI from patched Hermes to React Native",
92+
failText: (err) =>
93+
`Failed to copy JSI from Hermes to React Native: ${err.message}`,
94+
isEnabled: !silent,
95+
}
96+
);
9897
console.log(hermesPath);
9998
} catch (error) {
10099
if (error instanceof SpawnFailure) {

0 commit comments

Comments
 (0)