Add debug statements

This commit is contained in:
Ashcon Partovi 2023-02-22 18:05:23 -08:00
parent 41bc2e859b
commit 8c368db359
2 changed files with 8 additions and 2 deletions

5
dist/setup.js vendored
View File

@ -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);
}
}

View File

@ -99,10 +99,13 @@ function getDownloadUrl(options?: {
async function extractBun(path: string): Promise<string> {
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);
}
}