From bf9f6f75dc58df95b9d840e74740346a00578cf5 Mon Sep 17 00:00:00 2001 From: Daniel Biehl Date: Sun, 31 May 2026 02:23:25 +0200 Subject: [PATCH] fix: make hatch.envInterpreter enablement a valid when-clause The command was contributed with `"enablement": false` (a boolean), but `command.enablement` must be a string when-clause. VS Code feeds the value through `ContextKeyExpr.deserialize`, which calls `charCodeAt` on it and throws a TypeError. That exception aborts the commands extension-point handler mid-iteration, so every extension processed after Hatch loses its command registration (commands missing from the Command Palette, plus "command not defined in the 'commands' section" menu errors). Since `hatch.envInterpreter` is only invoked programmatically via `executeCommand`, drop `enablement` and hide it from the Command Palette with a `commandPalette` `when: "false"` menu entry instead. Fixes #194 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b1ddda9..f195e63 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ { "command": "hatch.envInterpreter", "title": "Hatch: Get an environment’s interpreter path", - "enablement": false + "enablement": "false" } ], "icons": {