File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
packages/react-native-node-api-modules/src/node/cli Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,17 @@ export const command = new Command("vendor-hermes")
2626 const appPackageRoot = packageDirectorySync ( { cwd : from } ) ;
2727 assert ( appPackageRoot , "Failed to find package root" ) ;
2828 const hermesPath = path . join ( HOST_PACKAGE_ROOT , "hermes" ) ;
29- if ( force ) {
30- fs . rmSync ( hermesPath , { recursive : true , force : true } ) ;
29+ if ( force && fs . existsSync ( hermesPath ) ) {
30+ await oraPromise (
31+ fs . promises . rm ( hermesPath , { recursive : true , force : true } ) ,
32+ {
33+ text : "Removing existing Hermes clone" ,
34+ successText : "Removed existing Hermes clone" ,
35+ failText : ( error ) =>
36+ `Failed to remove existing Hermes clone: ${ error . message } ` ,
37+ isEnabled : ! silent ,
38+ }
39+ ) ;
3140 }
3241 if ( ! fs . existsSync ( hermesPath ) ) {
3342 await oraPromise (
You can’t perform that action at this time.
0 commit comments