From b3214b1c71eadeec0cac566040a74ff869f1f1d9 Mon Sep 17 00:00:00 2001 From: Omar Brikaa Date: Fri, 6 Sep 2024 21:54:44 +0300 Subject: [PATCH] Fix path, fix Zig: CRLF -> LF --- api/src/runtime.js | 1 + packages/zig/0.10.1/compile | 12 ++++++------ packages/zig/0.10.1/environment | 8 ++++---- packages/zig/0.10.1/metadata.json | 18 +++++++++--------- packages/zig/0.10.1/run | 8 ++++---- packages/zig/0.10.1/test.zig | 12 ++++++------ 6 files changed, 30 insertions(+), 29 deletions(-) diff --git a/api/src/runtime.js b/api/src/runtime.js index 9a2adf4a..1d4a8fc9 100644 --- a/api/src/runtime.js +++ b/api/src/runtime.js @@ -185,6 +185,7 @@ class Runtime { .split('\n') .map(line => line.split('=', 2)) .forEach(([key, val]) => { + val = val.replace_all(this.pkgdir, '/runtime'); this._env_vars[key.trim()] = val.trim(); }); } diff --git a/packages/zig/0.10.1/compile b/packages/zig/0.10.1/compile index c0b03d15..75ee6ba4 100644 --- a/packages/zig/0.10.1/compile +++ b/packages/zig/0.10.1/compile @@ -1,6 +1,6 @@ -#!/usr/bin/env bash - -# optimizing for small programs -rename 's/$/\.zig/' "$@" # Add .zig extension - -zig build-exe -O ReleaseSafe --color off --cache-dir . --global-cache-dir . --name out *.zig \ No newline at end of file +#!/usr/bin/env bash + +# optimizing for small programs +rename 's/$/\.zig/' "$@" # Add .zig extension + +zig build-exe -O ReleaseSafe --color off --cache-dir . --global-cache-dir . --name out *.zig diff --git a/packages/zig/0.10.1/environment b/packages/zig/0.10.1/environment index 8752bdbc..a85000c8 100644 --- a/packages/zig/0.10.1/environment +++ b/packages/zig/0.10.1/environment @@ -1,4 +1,4 @@ -#!/usr/bin/env bash - -# compiler path -export PATH=$PWD/bin:$PATH \ No newline at end of file +#!/usr/bin/env bash + +# compiler path +export PATH=$PWD/bin:$PATH diff --git a/packages/zig/0.10.1/metadata.json b/packages/zig/0.10.1/metadata.json index 20a9963c..c7bed08d 100644 --- a/packages/zig/0.10.1/metadata.json +++ b/packages/zig/0.10.1/metadata.json @@ -1,9 +1,9 @@ -{ - "language": "zig", - "version": "0.10.1", - "aliases": [], - "limit_overrides": { - "compile_timeout": 15000, - "compile_cpu_time": 15000 - } -} +{ + "language": "zig", + "version": "0.10.1", + "aliases": [], + "limit_overrides": { + "compile_timeout": 15000, + "compile_cpu_time": 15000 + } +} diff --git a/packages/zig/0.10.1/run b/packages/zig/0.10.1/run index 70376eb3..d96e06fa 100644 --- a/packages/zig/0.10.1/run +++ b/packages/zig/0.10.1/run @@ -1,4 +1,4 @@ -#!/usr/bin/env bash - -shift # Filename is only used in compile step, so we can take it out here -./out "$@" \ No newline at end of file +#!/usr/bin/env bash + +shift # Filename is only used in compile step, so we can take it out here +./out "$@" diff --git a/packages/zig/0.10.1/test.zig b/packages/zig/0.10.1/test.zig index f0e287e1..7cb5eb6c 100644 --- a/packages/zig/0.10.1/test.zig +++ b/packages/zig/0.10.1/test.zig @@ -1,6 +1,6 @@ -const std = @import("std"); - -pub fn main() !void { - const stdout = std.io.getStdOut().writer(); - try stdout.print("OK\n", .{}); -} \ No newline at end of file +const std = @import("std"); + +pub fn main() !void { + const stdout = std.io.getStdOut().writer(); + try stdout.print("OK\n", .{}); +}