Skip to content

Commit 2742236

Browse files
committed
Hide deprecated chromium from tool listings when not installed
After #14334 deprecated the chromium installer, `quarto list tools` and `quarto check install` still show chromium as "Not installed" even for users who never had it. This is noise — no one should be installing it. Add `isDeprecatedTool()` helper to filter deprecated tools from both `loadTools()` and `allTools()` when not installed. Users with chromium still installed see it (with the deprecation hint) so they can uninstall. The helper and chromium registry entry get removed entirely in v1.11. Also adds a CI assertion in test-install.yml to verify chromium does not appear in `quarto list tools` after the redirect install.
1 parent cc169e5 commit 2742236

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

.github/workflows/test-install.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,16 @@ jobs:
120120
exit 1
121121
fi
122122
123+
- name: Verify quarto list tools does not show chromium
124+
shell: bash
125+
run: |
126+
output=$(quarto list tools 2>&1)
127+
echo "$output"
128+
if echo "$output" | grep -iq "chromium"; then
129+
echo "::error::Deprecated chromium should not appear in 'quarto list tools' when not installed"
130+
exit 1
131+
fi
132+
123133
- name: Update chromium (should redirect) and capture result
124134
id: update-chromium
125135
shell: bash

src/tools/tools-console.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
installableTool,
1313
installableTools,
1414
installTool,
15+
isDeprecatedTool,
1516
toolSummary,
1617
uninstallTool,
1718
updateTool,
@@ -94,6 +95,7 @@ export async function loadTools(): Promise<ToolInfo[]> {
9495
for (const key of installableTools()) {
9596
const tool = installableTool(key);
9697
const installed = await tool.installed();
98+
if (!installed && isDeprecatedTool(key)) continue;
9799
const version = await tool.installedVersion();
98100
const latest = await tool.latestRelease();
99101
toolInfos.push({ key, tool, version, installed, latest });

src/tools/tools.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ const kInstallableTools: { [key: string]: InstallableTool } = {
3737
verapdf: verapdfInstallable,
3838
};
3939

40+
// Tools deprecated in v1.10, to be removed from the registry in v1.11
41+
const kDeprecatedTools = new Set(["chromium"]);
42+
43+
export function isDeprecatedTool(key: string): boolean {
44+
return kDeprecatedTools.has(key);
45+
}
46+
4047
export async function allTools(): Promise<{
4148
installed: InstallableTool[];
4249
notInstalled: InstallableTool[];
@@ -50,7 +57,7 @@ export async function allTools(): Promise<{
5057
const isInstalled = await tool.installed();
5158
if (isInstalled) {
5259
installed.push(tool);
53-
} else {
60+
} else if (!isDeprecatedTool(name)) {
5461
notInstalled.push(tool);
5562
}
5663
}

0 commit comments

Comments
 (0)