Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace path separator on windows #53

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28662,6 +28662,14 @@ module.exports = require("path");

/***/ }),

/***/ 7282:
/***/ ((module) => {

"use strict";
module.exports = require("process");

/***/ }),

/***/ 3477:
/***/ ((module) => {

Expand Down Expand Up @@ -28846,6 +28854,7 @@ const path = __nccwpck_require__(1017);
const shortid = __nccwpck_require__(794);
const klawSync = __nccwpck_require__(9036);
const { lookup } = __nccwpck_require__(3583);
const { platform } = __nccwpck_require__(7282);

const AWS_KEY_ID = core.getInput('aws_key_id', {
required: true
Expand Down Expand Up @@ -28897,7 +28906,10 @@ function run() {
return Promise.all(
paths.map(p => {
const fileStream = fs.createReadStream(p.path);
const bucketPath = path.join(destinationDir, path.relative(sourceDir, p.path));
let bucketPath = path.join(destinationDir, path.relative(sourceDir, p.path));
if (process.platform === 'win32') {
bucketPath = bucketPath.replace("\\", "\/")
}
const params = {
Bucket: BUCKET,
ACL: 'public-read',
Expand Down
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const path = require('path');
const shortid = require('shortid');
const klawSync = require('klaw-sync');
const { lookup } = require('mime-types');
const { platform } = require('process');

const AWS_KEY_ID = core.getInput('aws_key_id', {
required: true
Expand Down Expand Up @@ -56,7 +57,10 @@ function run() {
return Promise.all(
paths.map(p => {
const fileStream = fs.createReadStream(p.path);
const bucketPath = path.join(destinationDir, path.relative(sourceDir, p.path));
let bucketPath = path.join(destinationDir, path.relative(sourceDir, p.path));
if (process.platform === 'win32') {
bucketPath = bucketPath.replace("\\", "\/")
}
const params = {
Bucket: BUCKET,
ACL: 'public-read',
Expand Down