Skip to content

Commit bde4f46

Browse files
committed
check - add info section
1 parent ce7182e commit bde4f46

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/command/check/check.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,25 @@ import { which } from "../../core/path.ts";
4545
import { dirname } from "../../deno_ral/path.ts";
4646
import { notebookContext } from "../../render/notebook/notebook-context.ts";
4747
import { typstBinaryPath } from "../../core/typst.ts";
48+
import { quartoCacheDir } from "../../core/appdirs.ts";
4849

4950
const kIndent = " ";
5051

51-
export type Target = "install" | "jupyter" | "knitr" | "versions" | "all";
52+
export type Target =
53+
| "install"
54+
| "jupyter"
55+
| "knitr"
56+
| "versions"
57+
| "info"
58+
| "all";
5259

5360
export async function check(target: Target): Promise<void> {
5461
const services = renderServices(notebookContext());
5562
try {
5663
info(`Quarto ${quartoConfig.version()}`);
64+
if (target === "info" || target === "all") {
65+
await checkInfo(services);
66+
}
5767
if (target === "versions" || target === "all") {
5868
await checkVersions(services);
5969
}
@@ -71,6 +81,13 @@ export async function check(target: Target): Promise<void> {
7181
}
7282
}
7383

84+
// Currently this doesn't check anything, but
85+
async function checkInfo(_services: RenderServices) {
86+
const cacheDir = quartoCacheDir();
87+
completeMessage("Checking environment information...");
88+
info(kIndent + "Quarto cache location: " + cacheDir);
89+
}
90+
7491
async function checkVersions(_services: RenderServices) {
7592
const checkVersion = async (
7693
version: string | undefined,

0 commit comments

Comments
 (0)