From 202ebea628db9eeb5a2eb1fdaebb5a8de97df4d1 Mon Sep 17 00:00:00 2001 From: Meghan Denny Date: Fri, 11 Oct 2024 03:11:07 -0700 Subject: [PATCH] always try to run a file if script name starts with ./ --- src/cli/run_command.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli/run_command.zig b/src/cli/run_command.zig index 84b62dfe6d..6d311e9f50 100644 --- a/src/cli/run_command.zig +++ b/src/cli/run_command.zig @@ -1300,7 +1300,7 @@ pub const RunCommand = struct { // This doesn't cover every case if ((script_name_to_search.len == 1 and script_name_to_search[0] == '.') or - (script_name_to_search.len == 2 and @as(u16, @bitCast(script_name_to_search[0..2].*)) == @as(u16, @bitCast([_]u8{ '.', '/' })))) + (script_name_to_search.len >= 2 and @as(u16, @bitCast(script_name_to_search[0..2].*)) == @as(u16, @bitCast([_]u8{ '.', '/' })))) { Run.boot(ctx, ".") catch |err| { bun.handleErrorReturnTrace(err, @errorReturnTrace());