albertorestifo / gulp-gcloud-publish

Gulp task to publish to Google Cloud Storage

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Windows Compatability

oliver-bauer opened this issue · comments

Hi albertorestifo, when running gulp-gcloud-publish on Windows, the paths on gcloud are not set correctly.
Windows uses \ for paths and, accordingly, the files are wrongly transferred to gcloud.

Adding if(/^win/.test(process.platform)) { var _relative = _relative.replace("\", "/") } after Line 42 in the index.js will do the trick.
https://github.com/albertorestifo/gulp-gcloud-publish/blob/master/libs/index.js#L42

Best Oliver

Hey, Oliver. Thanks for the report.

You're right in saying that the problem is the paths, however, the best (and really only solution that should be considered) is to replace all the path logic with the built-in Path module.

I should be able to push a fix by the end of the weekend.

Hi albertorestifo, fully agree with you - path module is the most clean version and not just a quick hack.
Thank you so much for fixing! All the best, Oliver

Hi albertorestifo, I just created a pull request using unixify to convert the file paths. ; )
Hope this works for you!