From 42e96b4875f440a50d9965dbe034ca36e60572f4 Mon Sep 17 00:00:00 2001 From: Froxcey Date: Mon, 19 Feb 2024 20:37:08 +0800 Subject: [PATCH] Use debug.err and exit 1 for windows fail message --- build.zig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build.zig b/build.zig index 7d35a07..99a30c0 100644 --- a/build.zig +++ b/build.zig @@ -3,8 +3,10 @@ const build_facilio = @import("facil.io/build.zig").build_facilio; pub fn build(b: *std.Build) !void { const target = b.standardTargetOptions(.{}); - if (target.getOsTag() == .windows) - @panic("\nCurrently, Facil.io and Zap are not compatible with Windows. Consider using Linux or Windows Subsystem for Linux (WSL) instead.\nFor more information, please see:\n- https://github.com/zigzap/zap#most-faq\n- https://facil.io/#forking-contributing-and-all-that-jazz\n"); + if (target.getOsTag() == .windows) { + std.log.err("\x1b[31mPlatform Not Supported\x1b[0m\nCurrently, Facil.io and Zap are not compatible with Windows. Consider using Linux or Windows Subsystem for Linux (WSL) instead.\nFor more information, please see:\n- https://github.com/zigzap/zap#most-faq\n- https://facil.io/#forking-contributing-and-all-that-jazz\n", .{}); + std.os.exit(1); + } // Standard release options allow the person running `zig build` to select // between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall. const optimize = b.standardOptimizeOption(.{});