leprechaun
leprechaun copied to clipboard
serveAssets ignores all assets
Hi John,
Thanks for your reply and solution in issues JohnCoene/packer#23 and #7. I finally had some time again to take a look at it again.
The ignoring of the index.js works!
However, I noticed that when not adding it to the ignore, it would still be ignored.
It turns out that not ignoring any assets results in all assets being ignored.
I looked into the problem and found the cause, it has to do with the regular expression that is created find ignored assets.
When the vector is empty, the regex becomes "$", this will make it so that all assets are matched and thus ignored.
I fixed it like this:
ignore_pat <- paste0(c("^", ignore), collapse = "|", sep ="$")
This will always add "^$" to the regular expression which should match nothing and thus ignore nothing.