Skip to content

Commit c6967f4

Browse files
committed
quarto list extension command lists formats incorrectly
Checking for undefined isn’t enough, as the object will be present but with no keys when the extension contributes no formats.
1 parent 5aef6f9 commit c6967f4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/command/list/cmd.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ async function outputExtensions(
8888
}
8989

9090
if (
91-
extension.contributes.formats
91+
extension.contributes.formats &&
92+
Object.keys(extension.contributes.formats).length > 0
9293
) {
9394
contribs.push("formats");
9495
}
@@ -104,7 +105,7 @@ async function outputExtensions(
104105
extensionEntries.push(row);
105106
});
106107

107-
const table = new Table().header(["Id", "Version", "Type"]).body(
108+
const table = new Table().header(["Id", "Version", "Contributes"]).body(
108109
extensionEntries,
109110
).padding(4);
110111
info(table.toString());

0 commit comments

Comments
 (0)