I kept getting errors if I didn't define scss or js files for patterns, if I had those types in my tabsToAdd option. I think this is a decent fix, but not sure why existing tabFileNameStats.isFile() was not preventing the attempt to copy a non-existent file. In this case, tabFileNameStats is definitively set to null unless the fs.statSync succeeds in the try block.
I kept getting errors if I didn't define scss or js files for patterns, if I had those types in my
tabsToAdd
option. I think this is a decent fix, but not sure why existingtabFileNameStats.isFile()
was not preventing the attempt to copy a non-existent file. In this case,tabFileNameStats
is definitively set to null unless thefs.statSync
succeeds in the try block.