Skip to content

Commit 5a76ee8

Browse files
cdervclaude
andcommitted
Fix CLI help text consistency and case-insensitive tool routing
Make tool shortcut routing in resolveCompatibleArgs case-insensitive so `quarto install TinyTeX` and similar mixed-case variants work. Align install/uninstall/update descriptions to all list available tools dynamically. Add debug logging in findCftExecutable fallback path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent b0da17c commit 5a76ee8

4 files changed

Lines changed: 6 additions & 5 deletions

File tree

src/command/install/cmd.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const installCommand = new Command()
3636
"Update system path when a tool is installed",
3737
)
3838
.description(
39-
`Installs a global dependency (${installableToolNames().join(", ")}).`,
39+
`Installs an extension or global dependency (${installableToolNames().join(", ")}).`,
4040
)
4141
.example(
4242
"Install TinyTeX",

src/command/remove/cmd.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ export const resolveCompatibleArgs = (
173173
return {
174174
action: "extension",
175175
};
176-
} else if (installableTools().includes(extname)) {
176+
} else if (installableTools().includes(extname.toLowerCase())) {
177177
return {
178178
action: "tool",
179179
name: args[0],

src/command/update/cmd.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
selectTool,
1515
updateOrInstallTool,
1616
} from "../../tools/tools-console.ts";
17+
import { installableToolNames } from "../../tools/tools.ts";
1718
import { resolveCompatibleArgs } from "../remove/cmd.ts";
1819

1920
export const updateCommand = new Command()
@@ -28,7 +29,7 @@ export const updateCommand = new Command()
2829
"Embed this extension within another extension (used when authoring extensions).",
2930
)
3031
.description(
31-
"Updates an extension or global dependency.",
32+
`Updates an extension or global dependency (${installableToolNames().join(", ")}).`,
3233
)
3334
.example(
3435
"Update extension (Github)",

src/tools/impl/chrome-for-testing.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ export function findCftExecutable(
140140
if (existsSync(knownPath)) {
141141
return knownPath;
142142
}
143-
} catch {
144-
// Platform detection failed — fall through to walk
143+
} catch (e) {
144+
debug(`findCftExecutable: platform detection failed, falling back to walk: ${e}`);
145145
}
146146

147147
// Fallback: bounded walk for unexpected directory structures

0 commit comments

Comments
 (0)