MCPcopy Create free account
hub / github.com/CapSoftware/Cap / ensureTinybirdCli

Function ensureTinybirdCli

scripts/analytics/setup-analytics.js:30–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28};
29
30const ensureTinybirdCli = () => {
31 try {
32 run(TB_BINARY, ["--version"], { stdio: "ignore" });
33 } catch {
34 console.log("Tinybird CLI not found. Installing via pip...");
35 run(DEFAULT_PYTHON, ["-m", "pip", "install", "--user", "tinybird-cli"], {
36 stdio: "inherit",
37 });
38 console.log("Tinybird CLI installed. Re-running version check...");
39 run(TB_BINARY, ["--version"], { stdio: "inherit" });
40 }
41};
42
43const ensureTinybirdLogin = () => {
44 if (fs.existsSync(rootTinybPath)) {

Callers 1

mainFunction · 0.85

Calls 1

runFunction · 0.70

Tested by

no test coverage detected