From da412bd6d903bc83cbb2916ab8ef6a7e1d0c8bd6 Mon Sep 17 00:00:00 2001 From: Tal Kol Date: Sun, 8 May 2022 23:37:31 +0100 Subject: [PATCH] Improve cross-platform (Windows) --- build/_build.ts | 2 +- build/_setup.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/_build.ts b/build/_build.ts index 24e0e3d..586355b 100644 --- a/build/_build.ts +++ b/build/_build.ts @@ -101,7 +101,7 @@ async function main() { // run the func compiler to create a fif file console.log(` - Trying to compile '${mergedFuncArtifact}' with 'func' compiler..`); - const buildErrors = child_process.execSync(`func -APS -o build/${contractName}.fif ${mergedFuncArtifact} 2>&1 >&-`).toString(); + const buildErrors = child_process.execSync(`func -APS -o build/${contractName}.fif ${mergedFuncArtifact} 1>&3 2>&1`).toString(); if (buildErrors.length > 0) { console.log(` - OH NO! Compilation Errors! The compiler output was:`); console.log(`\n${buildErrors}`); diff --git a/build/_setup.ts b/build/_setup.ts index 688468d..9ddedc2 100644 --- a/build/_setup.ts +++ b/build/_setup.ts @@ -3,11 +3,11 @@ // We rely on this script for example to support Glitch.com (online IDE) and have it working in one click import fs from "fs"; -import path from "path"; import child_process from "child_process"; // package ton-compiler brings its own func and fift executables which interfere with the system ones -fs.rmSync(path.join(__dirname, "..", "node_modules", "ton-compiler", "bin"), { recursive: true, force: true }); +fs.unlinkSync(__dirname + "/../node_modules/.bin/func"); +fs.unlinkSync(__dirname + "/../node_modules/.bin/fift"); // check if we're running on glitch.com (glitch is running Ubuntu 16) if (fs.existsSync("/app/.glitchdotcom.json")) {