Skip to content

Commit

Permalink
Resolved depration warning filehandle.close()
Browse files Browse the repository at this point in the history
  • Loading branch information
marcofranssen committed Sep 23, 2024
1 parent 7d01791 commit a907b72
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/capture-policy/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/capture-policy/index.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion lib/upload-iam-policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ function sleep(ms: number): Promise<void> {

async function fileExists(fileName: string): Promise<boolean> {
try {
await open(fileName, "r");
const file = await open(fileName, "r");
file.close();
return true;
} catch (e) {
return false;
Expand Down

0 comments on commit a907b72

Please sign in to comment.