File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -21,16 +21,10 @@ class CoCreateLazyLoader {
2121 const scriptsDirectory = './scripts' ;
2222
2323 try {
24- await fs . access ( directory ) ;
25- console . log ( "The directory exists." ) ;
24+ await fs . mkdir ( scriptsDirectory , { recursive : true } ) ;
2625 } catch ( error ) {
27- try {
28- await fs . mkdir ( scriptsDirectory , { recursive : true } ) ;
29- console . log ( `Scripts directory created at ${ scriptsDirectory } ` ) ;
30- } catch ( error ) {
31- console . error ( 'Error creating scripts directory:' , error ) ;
32- throw error ; // Halt execution if directory creation fails
33- }
26+ console . error ( 'Error creating scripts directory:' , error ) ;
27+ throw error ; // Halt execution if directory creation fails
3428 }
3529
3630 this . modules = await Config ( 'modules' , false , false )
You can’t perform that action at this time.
0 commit comments