diff --git a/dist/setup.js b/dist/setup.js index 108970c..1b65dae 100644 --- a/dist/setup.js +++ b/dist/setup.js @@ -75,10 +75,13 @@ function getDownloadUrl(options) { async function extractBun(path) { for (const entry of await readdir(path, { withFileTypes: true })) { const entryPath = join(path, entry.name); + action.debug(`Looking: ${entryPath}`); if (entry.name === "bun" && entry.isFile()) { + action.debug(`Found: ${entryPath}`); return entryPath; } - if (entry.isDirectory()) { + if (entry.name.startsWith("bun") && entry.isDirectory()) { + action.debug(`Continue looking: ${entryPath}`); return extractBun(entryPath); } } diff --git a/src/setup.ts b/src/setup.ts index 7366f7c..6de7347 100644 --- a/src/setup.ts +++ b/src/setup.ts @@ -99,10 +99,13 @@ function getDownloadUrl(options?: { async function extractBun(path: string): Promise { for (const entry of await readdir(path, { withFileTypes: true })) { const entryPath = join(path, entry.name); + action.debug(`Looking: ${entryPath}`); if (entry.name === "bun" && entry.isFile()) { + action.debug(`Found: ${entryPath}`); return entryPath; } - if (entry.isDirectory()) { + if (entry.name.startsWith("bun") && entry.isDirectory()) { + action.debug(`Continue looking: ${entryPath}`); return extractBun(entryPath); } }