adamreisnz / replace-in-file

A simple utility to quickly replace contents in one or more files
580 stars 65 forks source link

fix glob config is not usefull #116

Closed akaguny closed 4 years ago

akaguny commented 4 years ago

https://github.com/adamreisnz/replace-in-file/blob/f94e466cb05942934a6f654ab100821cb4166ac5/lib/helpers/parse-config.js#L31 because glob config has default value, is empty object. Right side of condition not execute anytime

adamreisnz commented 4 years ago

Right side of the code will execute when you pass in for example {glob: null} as config. The defaults are only applied later on in the code, on line 66.