From f68bfd49ea129ae7c2aea1e56f93c2fddc875fa6 Mon Sep 17 00:00:00 2001 From: RiskyMH Date: Tue, 11 Feb 2025 15:35:16 +0000 Subject: [PATCH] . --- src/cli/init_command.zig | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/cli/init_command.zig b/src/cli/init_command.zig index 98cf19b336..2d225c2748 100644 --- a/src/cli/init_command.zig +++ b/src/cli/init_command.zig @@ -24,16 +24,7 @@ const JSPrinter = bun.js_printer; const exists = bun.sys.exists; const existsZ = bun.sys.existsZ; -// makes read return error.WouldBlock instead of blocking if no input is available -// posix only -fn setNonblock(b: bool) !void { - var flags: std.posix.O = @bitCast(@as(u32, @intCast(try std.posix.fcntl(std.posix.STDIN_FILENO, std.posix.F.GETFL, 0)))); - flags.NONBLOCK = b; - _ = try std.posix.fcntl(std.posix.STDIN_FILENO, std.posix.F.SETFL, @as(u32, @bitCast(flags))); -} - -// makes it so that no newline character is required for forwarding the input -// also makes it so that input characters are not printed to the console +// make terminal input raw fn setRawInput(b: bool) !void { if (comptime Environment.isWindows) { const ENABLE_ECHO_INPUT: u32 = 0x0004;