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 {
21
21
const scriptsDirectory = './scripts' ;
22
22
23
23
try {
24
- await fs . access ( directory ) ;
25
- console . log ( "The directory exists." ) ;
24
+ await fs . mkdir ( scriptsDirectory , { recursive : true } ) ;
26
25
} 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
34
28
}
35
29
36
30
this . modules = await Config ( 'modules' , false , false )
You can’t perform that action at this time.
0 commit comments