mirror of
https://github.com/oven-sh/setup-bun.git
synced 2025-02-23 10:40:10 +08:00
Add debug statements
This commit is contained in:
parent
41bc2e859b
commit
8c368db359
5
dist/setup.js
vendored
5
dist/setup.js
vendored
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user