diff options
author | 2023-09-18 20:14:32 -0700 | |
---|---|---|
committer | 2023-09-18 20:14:32 -0700 | |
commit | 1b949d4f5a855838c7169a4a6033fee6638c87f8 (patch) | |
tree | b8cca531ab95a4a0e613bbcee877d6bb0d4d3951 /src | |
parent | 064721668740397763a2ab6b6293d5d34a7b14a8 (diff) | |
download | bun-1b949d4f5a855838c7169a4a6033fee6638c87f8.tar.gz bun-1b949d4f5a855838c7169a4a6033fee6638c87f8.tar.zst bun-1b949d4f5a855838c7169a4a6033fee6638c87f8.zip |
`bun run` fix missing script error on empty file (#5025)
* Fix empty file not found bug
* Add tests
* fix test
---------
Co-authored-by: Jeremy Funk <jeremy@kombo.dev>
Co-authored-by: dave caruso <me@paperdave.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/cli/run_command.zig | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/cli/run_command.zig b/src/cli/run_command.zig index 3ef68b494..f31520cc8 100644 --- a/src/cli/run_command.zig +++ b/src/cli/run_command.zig @@ -973,7 +973,6 @@ pub const RunCommand = struct { var shebang: string = shebang_buf[0..shebang_size]; shebang = std.mem.trim(u8, shebang, " \r\n\t"); - if (shebang.len == 0) break :possibly_open_with_bun_js; if (strings.hasPrefixComptime(shebang, "#!")) { const first_arg: string = if (bun.argv().len > 0) bun.span(bun.argv()[0]) else ""; const filename = std.fs.path.basename(first_arg); |