Skip to content

Commit

Permalink
fix: await close
Browse files Browse the repository at this point in the history
  • Loading branch information
brenoepics committed Jun 16, 2024
1 parent 147275f commit f18b551
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
5 changes: 2 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -290379,8 +290379,8 @@ async function getScanResults(scan, username) {
const url = `${constants_1.GitRoll.SCAN_URL}?id=${scan.id}&user=${username}&pid=${scan.profileId}&_rsc=5cmev`;
await page.goto(url);
await page.waitForNavigation({ timeout: WAIT_SCAN_TIMEOUT });
return await page.content().then(content => {
void browser.close();
return await page.content().then(async (content) => {
await browser.close();
return REGEX_META_TAG.exec(content)?.[1];
});
}
Expand Down Expand Up @@ -290585,7 +290585,6 @@ async function run() {
const waitForScan = core.getBooleanInput("wait");
const content = await startScan(username, waitForScan);
core.info(`Results: ${JSON.stringify(content)}`);
await Promise.resolve();
}
exports.run = run;
/**
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/api/gitroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ export async function getScanResults(
const url: string = `${GitRoll.SCAN_URL}?id=${scan.id}&user=${username}&pid=${scan.profileId}&_rsc=5cmev`;
await page.goto(url);
await page.waitForNavigation({ timeout: WAIT_SCAN_TIMEOUT });
return await page.content().then(content => {
void browser.close();
return await page.content().then(async content => {
await browser.close();
return REGEX_META_TAG.exec(content)?.[1];
});
}
Expand Down
1 change: 0 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export async function run(): Promise<void> {
const waitForScan: boolean = core.getBooleanInput("wait");
const content: GitRollResult = await startScan(username, waitForScan);
core.info(`Results: ${JSON.stringify(content)}`);
await Promise.resolve();
}

/**
Expand Down

0 comments on commit f18b551

Please sign in to comment.