Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
quarto-dev
GitHub Repository: quarto-dev/quarto-cli
Path: blob/main/src/command/check/cmd.ts
3562 views
1
/*
2
* cmd.ts
3
*
4
* Copyright (C) 2021-2022 Posit Software, PBC
5
*/
6
7
import { Command } from "cliffy/command/mod.ts";
8
import { check, enforceTargetType } from "./check.ts";
9
10
export const checkCommand = new Command()
11
.name("check")
12
.option("--output <path>", "Output as JSON to a file")
13
.option(
14
"--no-strict",
15
"When set, will not fail if dependency versions don't match precisely",
16
)
17
.arguments("[target:string]")
18
.description(
19
"Verify correct functioning of Quarto installation.\n\n" +
20
"Check specific functionality with argument install, jupyter, knitr, or all.",
21
)
22
.example("Check Quarto installation", "quarto check install")
23
.example("Check Jupyter engine", "quarto check jupyter")
24
.example("Check Knitr engine", "quarto check knitr")
25
.example("Check installation and all engines", "quarto check all")
26
// deno-lint-ignore no-explicit-any
27
.action(async (options: any, targetStr?: string) => {
28
targetStr = targetStr || "all";
29
await check(
30
enforceTargetType(targetStr),
31
options.strict,
32
options.output,
33
);
34
});
35
36