From 31a9143ec622bab026cb8e6a3000ae10ae055bc7 Mon Sep 17 00:00:00 2001 From: liuhao1024 Date: Sat, 19 Sep 2026 20:48:07 +0800 Subject: [PATCH] review: note why Deno maps to no value-taking globals MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per review polish: a comment on the empty deno set in _INTERPRETER_WITH_ARG saves future readers a double-take — Deno's inline-script entry is the bare eval subcommand, and its dash flags use = values. --- tools/approval_detection.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/approval_detection.py b/tools/approval_detection.py index f0612c5d70..755d15f94b 100644 --- a/tools/approval_detection.py +++ b/tools/approval_detection.py @@ -596,6 +596,9 @@ _INTERPRETER_WITH_ARG = { "php": {"-c", "-d", "-z"}, "powershell": {"-configurationname", "-custompipename", "-executionpolicy", "-inputformat", "-outputformat", "-settingsfile", "-version", "-windowstyle", "-workingdirectory"}, + # Deno deliberately maps to no value-taking globals: its inline-script entry is the + # bare `eval` subcommand (first-arg fast path below), and its dash flags that precede + # `eval` (--ext, --no-check, ...) never swallow the next token as a value. "bun": {"--config", "--cwd", "--env-file", "--preload", "--require"}, "deno": set(), } _READ_TOOL_EXEC_FLAGS = {