File tree 2 files changed +17
-3
lines changed
2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -330,7 +330,12 @@ saved
330
330
// Clear output folder structure for selected sub-type
331
331
// only run this if the standard deploy folder is a target of buildDefinition (which technically could be changed)
332
332
Util . logger . info ( ` - 🚮 purging folder ${ deployDir } ` ) ;
333
- await File . remove ( deployDir ) ;
333
+ try {
334
+ await File . remove ( deployDir ) ;
335
+ } catch {
336
+ // sometimes the first attempt is not successful for some operating system reason. Trying again mostly solves this
337
+ await File . remove ( deployDir ) ;
338
+ }
334
339
}
335
340
}
336
341
Original file line number Diff line number Diff line change @@ -13,8 +13,17 @@ let customRules = {};
13
13
let customRuleImport ;
14
14
try {
15
15
customRuleImport = await import ( 'file://' + path . join ( process . cwd ( ) , '.mcdev-validations.js' ) ) ;
16
- } catch {
17
- Util . logger . debug ( '.mcdev-validations.js not found' ) ;
16
+ } catch ( ex ) {
17
+ if ( ex instanceof SyntaxError ) {
18
+ Util . logger . error ( 'SyntaxError in .mcdev-validations.js: ' + ex . message ) ;
19
+ } else if ( ex . code === 'ERR_MODULE_NOT_FOUND' ) {
20
+ Util . logger . debug ( '.mcdev-validations.js not found' ) ;
21
+ } else {
22
+ Util . logger . errorStack (
23
+ ex ,
24
+ 'Could not load custom validation rules from .mcdev-validations.js'
25
+ ) ;
26
+ }
18
27
}
19
28
/**
20
29
*
You can’t perform that action at this time.
0 commit comments