Skip to content

Commit

Permalink
🐞 Make zopfli target idempotent
Browse files Browse the repository at this point in the history
  • Loading branch information
KimlikDAO-bot committed Dec 28, 2024
1 parent df796b2 commit 6d51a70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kastro/compiler/compression.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { spawn } from "bun";
import { rename } from "node:fs/promises";
import { cp } from "node:fs/promises";

/**
* @param {string} inputName The asset to be compressed
Expand All @@ -23,7 +23,7 @@ const zopfli = (inputName, outputName) => spawn({
inputName
]
}).exited
.then(() => rename(inputName + ".gz", outputName + ".gz")))
.then(() => cp(inputName + ".gz", outputName + ".gz")))
.then(() => outputName + ".gz");

/**
Expand Down

0 comments on commit 6d51a70

Please sign in to comment.