gulp-gcloud-publish icon indicating copy to clipboard operation
gulp-gcloud-publish copied to clipboard

Windows Compatability

Open oliver-bauer opened this issue 7 years ago • 3 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

oliver-bauer avatar Apr 21 '17 08:04 oliver-bauer

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.

albertorestifo avatar Apr 22 '17 06:04 albertorestifo

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

oliver-bauer avatar Apr 22 '17 08:04 oliver-bauer

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

oliver-bauer avatar May 23 '17 15:05 oliver-bauer