Skip to content

Commit 17c6722

Browse files
committed
made font removal optional
1 parent 36f820c commit 17c6722

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

packages/nexrender-action-fonts/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ const path = require("path");
33
const { execSync } = require("child_process");
44
const { name } = require("./package.json");
55

6+
const ENABLE_FONT_REMOVAL = process.env.ENABLE_FONT_REMOVAL || false;
7+
68
const installMac = async (settings, job, fontpath) => {
79
const fontdir = path.join(process.env.HOME, "Library", "Fonts");
810
const fontdest = path.join(fontdir, path.basename(fontpath));
@@ -159,6 +161,10 @@ module.exports = async (job, settings, params, type) => {
159161
continue;
160162
}
161163

164+
if (!ENABLE_FONT_REMOVAL) {
165+
continue;
166+
}
167+
162168
if (process.platform === "darwin") {
163169
await uninstallMac(settings, job, asset.dest);
164170
} else if (process.platform === "win32") {

0 commit comments

Comments
 (0)