Skip to content

Commit

Permalink
fix: ensure cacheDir name is unique
Browse files Browse the repository at this point in the history
  • Loading branch information
remarkablemark committed Jun 9, 2024
1 parent 77e3bb7 commit b9a71e7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

15 changes: 8 additions & 7 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,19 @@ export async function run() {
await exec('mv', [getBinaryPath(binaryDirectory, 'renpy'), binaryPath]);

// Add Android/iOS/Web support
const addons = (['rapt', 'renios', 'web'] as const).filter(
(platform) => getInput(platform) === 'true',
);
await Promise.all(
(['rapt', 'renios', 'web'] as const)
.filter((platform) => getInput(platform) === 'true')
.map((platform) =>
downloadTool(download[platform], binaryDirectory).then(
(downloadPath) => extractZip(downloadPath, binaryDirectory),
),
addons.map((platform) =>
downloadTool(download[platform], binaryDirectory).then((downloadPath) =>
extractZip(downloadPath, binaryDirectory),
),
),
);

// Cache the SDK
await cacheDir(binaryDirectory, name, version);
await cacheDir(binaryDirectory, [name, ...addons].join('_'), version);

// Expose the SDK by adding it to the PATH
addPath(binaryDirectory);
Expand Down

0 comments on commit b9a71e7

Please sign in to comment.