File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -224,10 +224,19 @@ export class LifecycleService extends AbstractServiceSchema implements OnApplica
224224 * It logs the process of loading and validating each file, and handles any errors that occur during file reading or validation.
225225 */
226226 private async loadLifecycleRules ( ) : Promise < ConfigObjectSchemaDTO [ ] > {
227+ let files : string [ ] = [ ] ;
228+
227229 const lifecycleRules : ConfigObjectSchemaDTO [ ] = [ ] ;
228230 this . logger . verbose ( 'Loading lifecycle rules from configuration files...' ) ;
231+ this . logger . verbose ( 'Initializing LifecycleService...' ) ;
232+
233+ try {
234+ files = readdirSync ( `${ process . cwd ( ) } /configs/lifecycle` ) ;
235+ } catch ( error ) {
236+ this . logger . error ( 'Error reading lifecycle files' , error . message , error . stack ) ;
237+ }
229238
230- for ( const file of readdirSync ( ` ${ process . cwd ( ) } /configs/lifecycle` ) ) {
239+ for ( const file of files ) {
231240 let schema : ConfigObjectSchemaDTO ;
232241 if ( ! file . endsWith ( '.yml' ) && ! file . endsWith ( '.yaml' ) ) {
233242 this . logger . warn ( `Skipping non-YAML file: ${ file } ` ) ;
You can’t perform that action at this time.
0 commit comments