From 8480285cb0e24f84dc68f2886426422f14bc999d Mon Sep 17 00:00:00 2001 From: Tal Kol Date: Sun, 8 May 2022 23:55:29 +0100 Subject: [PATCH] Improve cross-platform (Windows) --- build/_setup.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/build/_setup.ts b/build/_setup.ts index 9ddedc2..88b36ce 100644 --- a/build/_setup.ts +++ b/build/_setup.ts @@ -6,8 +6,14 @@ import fs from "fs"; import child_process from "child_process"; // package ton-compiler brings its own func and fift executables which interfere with the system ones -fs.unlinkSync(__dirname + "/../node_modules/.bin/func"); -fs.unlinkSync(__dirname + "/../node_modules/.bin/fift"); +try { + fs.unlinkSync(__dirname + "/../node_modules/.bin/func"); + fs.unlinkSync(__dirname + "/../node_modules/.bin/fift"); +} catch (e) {} +try { + fs.unlinkSync(__dirname + "/../node_modules/.bin/func.cmd"); + fs.unlinkSync(__dirname + "/../node_modules/.bin/fift.cmd"); +} catch (e) {} // check if we're running on glitch.com (glitch is running Ubuntu 16) if (fs.existsSync("/app/.glitchdotcom.json")) {