fix: remove redundant FileHandle.close()

Signed-off-by: Rui Chen <rui@chenrui.dev>
This commit is contained in:
Rui Chen 2025-06-10 18:07:30 -04:00
parent f3cad8bcbf
commit 6d62ca09e3
No known key found for this signature in database
GPG key ID: 6577287BDCA70840
3 changed files with 4 additions and 5 deletions

2
dist/index.js vendored

File diff suppressed because one or more lines are too long

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{ {
"name": "action-gh-release", "name": "action-gh-release",
"version": "2.2.2", "version": "2.3.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "action-gh-release", "name": "action-gh-release",
"version": "2.2.2", "version": "2.3.1",
"dependencies": { "dependencies": {
"@actions/core": "^1.11.1", "@actions/core": "^1.11.1",
"@actions/github": "^6.0.1", "@actions/github": "^6.0.1",

View file

@ -1,9 +1,9 @@
import { GitHub } from "@actions/github/lib/utils"; import { GitHub } from "@actions/github/lib/utils";
import { Config, isTag, releaseBody, alignAssetName } from "./util";
import { statSync } from "fs"; import { statSync } from "fs";
import { open } from "fs/promises"; import { open } from "fs/promises";
import { lookup } from "mime-types"; import { lookup } from "mime-types";
import { basename } from "path"; import { basename } from "path";
import { alignAssetName, Config, isTag, releaseBody } from "./util";
type GitHub = InstanceType<typeof GitHub>; type GitHub = InstanceType<typeof GitHub>;
@ -202,7 +202,6 @@ export const upload = async (
console.log(`✅ Uploaded ${name}`); console.log(`✅ Uploaded ${name}`);
return json; return json;
} finally { } finally {
await fh.close().catch(() => {});
} }
}; };