File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -98,14 +98,15 @@ async function runPackagePrepack(packagePrepackPath: string): Promise<void> {
9898// execute package specific settings
9999// 1. check if a package called `<package-root>/scripts/prepack.ts` exitsts
100100// if yes, 2.) execute that script for things that are package-specific
101- const packagePrepackPath = path . resolve ( 'scripts' , 'prepack.ts' ) ;
102- try {
103- if ( fs . existsSync ( packagePrepackPath ) ) {
104- void runPackagePrepack ( packagePrepackPath ) ;
101+ void ( async ( ) => {
102+ const packagePrepackPath = path . resolve ( 'scripts' , 'prepack.ts' ) ;
103+ try {
104+ if ( fs . existsSync ( packagePrepackPath ) ) {
105+ await runPackagePrepack ( packagePrepackPath ) ;
106+ }
107+ } catch ( error ) {
108+ console . error ( `Error while trying to access ${ packagePrepackPath . toString ( ) } ` ) ;
109+ process . exit ( 1 ) ;
105110 }
106- } catch ( error ) {
107- console . error ( `Error while trying to access ${ packagePrepackPath . toString ( ) } ` ) ;
108- process . exit ( 1 ) ;
109- }
110-
111- console . log ( `\nSuccessfully finished prepack commands for ${ pkgJson . name } \n` ) ;
111+ console . log ( `\nSuccessfully finished prepack commands for ${ pkgJson . name } \n` ) ;
112+ } ) ( ) ;
You can’t perform that action at this time.
0 commit comments