Skip to content

Commit

Permalink
chore: convert ArrayBuffer to Buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
outloudvi committed Jan 26, 2024
1 parent d65d8b8 commit e0dda49
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const core = require("@actions/core");
const fs = require("fs");
const path = require("path");
const { Buffer } = require("buffer");

function getFilenameFromUrl(url) {
const u = new URL(url);
Expand All @@ -17,6 +18,7 @@ async function tryFetch(url, retryTimes) {
for (let i = 0; i <= retryTimes; i++) {
result = await fetch(url)
.then((x) => x.arrayBuffer())
.then((x) => Buffer.from(x))
.catch((err) => {
console.error(
`${
Expand Down

0 comments on commit e0dda49

Please sign in to comment.