File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed
Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -68,14 +68,21 @@ const compileFirestoreRules = async function () {
6868 }
6969
7070 // Add Custom Helper Functions to 2nd position of array
71- logger (
72- chalk . magenta . bold ( "Adding " ) +
73- `custom helper functions from folder: ${ config . custom_helpers_folder } `
74- ) ;
7571 if ( config . custom_helpers_folder ) {
76- filesArray = glob
72+ logger (
73+ chalk . magenta . bold ( "Adding " ) +
74+ `custom helper functions from folder: ${ config . custom_helpers_folder } `
75+ ) ;
76+ const customHelperFunctions = glob
7777 . sync ( `${ execPath } /${ config . custom_helpers_folder } /**/*.rules` )
78- . concat ( filesArray ) ;
78+ if ( customHelperFunctions . length ) {
79+ filesArray = customHelperFunctions . concat ( filesArray )
80+ } else {
81+ logger (
82+ chalk . red . bold ( "Warning " ) +
83+ `You defined the "custom_helpers_folder" property but we could not find any custom helper functions. Please check if the folder & files exist.`
84+ ) ;
85+ }
7986 }
8087
8188 // Add Helper Functions to 2nd position of array
You can’t perform that action at this time.
0 commit comments