jussi-kalliokoski / gulp-awspublish-router

A router for defining file-specific rules with gulp-awspublish

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Breaks in Gulp 4, adds leading slash

damonmaria opened this issue · comments

I think a change in Vinyl has broken this package. file.base will not have a trailing slash according to the Vinyl docs. Therefore this line in initFile.js:

file.s3.path = file.path.replace(file.base, "").replace(new RegExp("\\" + path.sep, "g"), "/")

Will end up with a leading slash. Which then causes all files in S3 to be put into a top level 'directory' with no name.

Thanks for reporting and debugging! ❤️ 🎉

Fixed in a8fc995 and released as v0.1.4.

Closing, let me know if the fix didn't work for you.