From 00b7d6479bb70dbc83b431acbd29ea8e254afae8 Mon Sep 17 00:00:00 2001 From: Michael H Date: Fri, 6 Dec 2024 08:41:21 +1100 Subject: [PATCH] `bun repl` disable inspector/debugger (#15594) --- src/cli/bunx_command.zig | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/cli/bunx_command.zig b/src/cli/bunx_command.zig index 7f3113ec8f..1afa6fd6ff 100644 --- a/src/cli/bunx_command.zig +++ b/src/cli/bunx_command.zig @@ -327,6 +327,12 @@ pub const BunxCommand = struct { this_bundler.env.map.put("npm_lifecycle_event", "bunx") catch unreachable; this_bundler.env.map.put("npm_lifecycle_script", package_name) catch unreachable; + if (strings.eqlComptime(package_name, "bun-repl")) { + this_bundler.env.map.remove("BUN_INSPECT_CONNECT_TO"); + this_bundler.env.map.remove("BUN_INSPECT_NOTIFY"); + this_bundler.env.map.remove("BUN_INSPECT"); + } + const ignore_cwd = this_bundler.env.get("BUN_WHICH_IGNORE_CWD") orelse ""; if (ignore_cwd.len > 0) {