Skip to content

Commit

Permalink
adjust file content
Browse files Browse the repository at this point in the history
  • Loading branch information
luancazarine committed Jun 26, 2024
1 parent dfd6ab1 commit 2bbdbe8
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions components/transifex/actions/download-file/download-file.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,8 @@ export default {

} while (response.id && response.id === preparedDownloadId);

const file = response.toString("base64");
const buffer = Buffer.from(file, "base64");
const tmpDir = "/tmp";
const filePath = `${tmpDir}/downloaded_file_${this.asyncDownloadId}.json`;
fs.writeFileSync(filePath, buffer);
const filePath = `/tmp/downloaded_file_${this.asyncDownloadId}.json`;
fs.writeFileSync(filePath, JSON.stringify(response));

$.export("$summary", `Successfully downloaded file with asyncDownloadId: ${this.asyncDownloadId}`);
return {
Expand Down

0 comments on commit 2bbdbe8

Please sign in to comment.