Skip to content

Commit 48b0c24

Browse files
authored
Fix interactive tool selection in quarto install/update/uninstall (#13935)
* Fix interactive tool selection in quarto install/update/uninstall Same bug as #9765 - Cliffy's Select.prompt() returns the selected value directly, but the code incorrectly accesses .value on it. Using the prompt() array syntax with a named field as done in #9765. * changelog - add PR number and order
1 parent ab1c739 commit 48b0c24

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

‎news/changelog-1.9.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,4 @@ All changes included in 1.9:
136136
- ([#13856](https://github.com/quarto-dev/quarto-cli/issues/13856)): Add code annotation support for Typst and Observable.js code blocks. (author: @mcanouil)
137137
- ([#13890](https://github.com/quarto-dev/quarto-cli/issues/13890)): Fix render failure when using `embed-resources: true` with input path through a symlinked directory. The cleanup now resolves symlinks before comparing paths.
138138
- ([#13907](https://github.com/quarto-dev/quarto-cli/issues/13907)): Ignore AI assistant configuration files (`CLAUDE.md`, `AGENTS.md`) when scanning for project input files and in extension templates, similar to how `README.md` is handled.
139+
- ([#13935](https://github.com/quarto-dev/quarto-cli/issues/13935)): Fix `quarto install`, `quarto update`, and `quarto uninstall` interactive tool selection.

‎src/tools/tools-console.ts‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Copyright (C) 2021-2022 Posit Software, PBC
55
*/
66
import * as colors from "fmt/colors";
7-
import { Confirm, Select } from "cliffy/prompt/mod.ts";
7+
import { Confirm, prompt, Select } from "cliffy/prompt/mod.ts";
88
import { Table } from "cliffy/table/mod.ts";
99
import { info, warning } from "../deno_ral/log.ts";
1010

@@ -237,7 +237,8 @@ export async function selectTool(
237237
}
238238
};
239239

240-
const toolTarget: string = (await Select.prompt({
240+
const result = await prompt([{
241+
name: "tool",
241242
message: `Select a tool to ${action}`,
242243
options: toolsInfo.map((toolInfo) => {
243244
return {
@@ -248,6 +249,7 @@ export async function selectTool(
248249
: !toolInfo.installed,
249250
};
250251
}),
251-
})).value;
252-
return toolTarget;
252+
type: Select,
253+
}]);
254+
return result.tool;
253255
}

0 commit comments

Comments
 (0)