Skip to content

Commit fe989e5

Browse files
authored
Merge pull request #10411 from quarto-dev/fix/cliffy-prompt
cliffy - `Checkbox.prompt` returns value directly as a string
2 parents 843a420 + 207aa15 commit fe989e5

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/command/publish/account.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,11 @@ export async function manageAccounts() {
151151
}
152152

153153
// create a checked list from which accounts can be removed
154-
const keepAccounts = await Checkbox.prompt({
154+
const keepAccounts = await prompt([{
155+
name: "accounts",
155156
message: "Manage Publishing Accounts",
157+
type: Checkbox,
158+
indent: "",
156159
options: accounts.map((account) => ({
157160
name: `${findProvider(account.provider)?.description}: ${account.name}${
158161
account.server ? " (" + account.server + ")" : ""
@@ -163,15 +166,15 @@ export async function manageAccounts() {
163166
hint:
164167
`Use the arrow keys and spacebar to specify accounts you would like to remove.\n` +
165168
` Press Enter to confirm the list of accounts you wish to remain available.`,
166-
});
169+
}]);
167170

168171
// figure out which accounts we should be removing
169172
const removeAccounts: ProviderAccountToken[] = [];
170173
for (const account of accounts) {
171174
if (
172-
!keepAccounts.find((keepAccountJson) => {
175+
!keepAccounts.accounts?.find((keepAccountJson: string) => {
173176
const keepAccount = JSON.parse(
174-
keepAccountJson.value,
177+
keepAccountJson,
175178
) as ProviderAccountToken;
176179
return account.provider == keepAccount.provider &&
177180
account.name == keepAccount.name &&

0 commit comments

Comments
 (0)