Skip to content

Commit

Permalink
Fix cross-platform s3 upload paths (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiyuu-jin authored Sep 17, 2024
1 parent b447c91 commit 688ab4d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ $ npm install -g @hyperplay/cli
$ hyperplay COMMAND
running command...
$ hyperplay (--version)
@hyperplay/cli/2.14.0 darwin-arm64 node-v20.12.2
@hyperplay/cli/2.14.2 darwin-arm64 node-v20.12.2
$ hyperplay --help [COMMAND]
USAGE
$ hyperplay COMMAND
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hyperplay/cli",
"version": "2.14.1",
"version": "2.14.2",
"description": "Hyperplay CLI",
"author": "HyperPlay Labs, Inc.",
"bin": {
Expand Down
8 changes: 4 additions & 4 deletions src/releases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,13 @@ async function getFolderFiles(folderPath: string): Promise<Array<{ fileName: str
} else {
const fileSize = (await fs.promises.stat(entryPath)).size;

// Normalize to posix paths to ensure forward slashes
const relativeFileName = path.posix.relative(folderPath, entryPath);
const posixEntryPath = path.posix.join(folderPath, relativeFileName);
// Normalize the paths for cross-platform consistency
const relativeFileName = path.normalize(path.relative(folderPath, entryPath));
const normalizedEntryPath = path.normalize(entryPath);

fileList.push({
fileName: relativeFileName,
filePath: posixEntryPath,
filePath: normalizedEntryPath,
fileSize,
});
}
Expand Down

0 comments on commit 688ab4d

Please sign in to comment.