diff options
author | 2021-11-05 01:22:48 -0700 | |
---|---|---|
committer | 2021-11-05 01:22:48 -0700 | |
commit | b0e98892e5c54063eed1af364d6d9af8dd2fcffe (patch) | |
tree | f3197c2089b09090e5892e68258b6a5b0972076d | |
parent | 0006d28cbb3f2c4b3fe360c8264d202fe1867330 (diff) | |
download | bun-b0e98892e5c54063eed1af364d6d9af8dd2fcffe.tar.gz bun-b0e98892e5c54063eed1af364d6d9af8dd2fcffe.tar.zst bun-b0e98892e5c54063eed1af364d6d9af8dd2fcffe.zip |
[bun run] Exclude .config.* files from showing up as runnable with Bun.js
-rw-r--r-- | src/cli/run_command.zig | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cli/run_command.zig b/src/cli/run_command.zig index cfe545b01..ffbba1e99 100644 --- a/src/cli/run_command.zig +++ b/src/cli/run_command.zig @@ -399,7 +399,11 @@ pub const RunCommand = struct { while (iter.next()) |entry| { const name = entry.value.base(); - if (this_bundler.options.loader(std.fs.path.extension(name)).isJavaScriptLike() and !strings.contains(name, ".d.ts") and entry.value.kind(&this_bundler.fs.fs) == .file) { + if (!strings.contains(name, ".config") and + this_bundler.options.loader(std.fs.path.extension(name)).isJavaScriptLike() and + !strings.contains(name, ".d.ts") and + entry.value.kind(&this_bundler.fs.fs) == .file) + { _ = try results.getOrPut(this_bundler.fs.filename_store.append(@TypeOf(name), name) catch continue); } } |