Skip to content

Commit ba05422

Browse files
authored
Merge pull request #11155 from quarto-dev/feature/quarto-check-info
`quarto check` - add info section
2 parents 25fe2d7 + c56dc1e commit ba05422

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

news/changelog-1.6.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,3 +122,4 @@ All changes included in 1.6:
122122
- ([#10890](https://github.com/quarto-dev/quarto-cli/issues/10890)): Don't use ports that Firefox considers unsafe.
123123
- ([#10936](https://github.com/quarto-dev/quarto-cli/issues/10936)): Use `\\` in `meta` shortcode to escape the following character, allowing keys with `.` in them.
124124
- ([#11068](https://github.com/quarto-dev/quarto-cli/issues/11068)): use standard location when writing to standard output to avoid breakage under `self-contained: true`.
125+
- ([#11155](https://github.com/quarto-dev/quarto-cli/pull/11155)): Add cache location information to `quarto check`.

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)