Skip to content

Commit 24855c2

Browse files
committed
Update vendor-hermes to use UsageError
1 parent dc79b31 commit 24855c2

1 file changed

Lines changed: 6 additions & 11 deletions

File tree

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

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -93,17 +93,12 @@ export const command = new Command("vendor-hermes")
9393
},
9494
);
9595
} catch (error) {
96-
if (error instanceof SpawnFailure) {
97-
error.flushOutput("both");
98-
console.error(
99-
`\n🛑 React Native uses the ${hermesVersion} tag and cloning our fork failed.`,
100-
`Please see the Node-API package's peer dependency on "react-native" for supported versions.`,
101-
);
102-
process.exitCode = 1;
103-
return;
104-
} else {
105-
throw error;
106-
}
96+
throw new UsageError("Failed to clone custom Hermes", {
97+
cause: error,
98+
fix: {
99+
instructions: `Check the network connection and ensure this ${chalk.bold("react-native")} version is supported by ${chalk.bold("react-native-node-api")}.`,
100+
},
101+
});
107102
}
108103
}
109104
const hermesJsiPath = path.join(hermesPath, "API/jsi/jsi");

0 commit comments

Comments
 (0)