From ac16533ae49b4a44c9c6e4fab326ad620575ff0a Mon Sep 17 00:00:00 2001 From: XTON team <119496329+xtonwallet@users.noreply.github.com> Date: Thu, 9 Feb 2023 19:30:40 +0300 Subject: [PATCH] Update precompile.ts Using path.resolve for compatibility with all platforms --- src/pipeline/precompile.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pipeline/precompile.ts b/src/pipeline/precompile.ts index 0781edd..5f77ceb 100644 --- a/src/pipeline/precompile.ts +++ b/src/pipeline/precompile.ts @@ -43,7 +43,7 @@ function resolveLibraryPath(filePath: string, name: string): string { export function precompile(ctx: CompilerContext, sourceFile: string) { // Load stdlib - const stdlib = fs.readFileSync(__dirname + '/../../stdlib/stdlib.tact', 'utf-8'); + const stdlib = fs.readFileSync(path.resolve(__dirname, '..', '..', 'stdlib', 'stdlib.tact'), 'utf-8'); const code = fs.readFileSync(sourceFile, 'utf8'); // @@ -96,4 +96,4 @@ export function precompile(ctx: CompilerContext, sourceFile: string) { // Prepared context return ctx; -} \ No newline at end of file +}