Skip to content

Commit 0059c1e

Browse files
feat(cli): update header docs link for CI environments
1 parent f2f71f8 commit 0059c1e

File tree

1 file changed

+13
-1
lines changed
  • packages/cli/src/cli/utils

1 file changed

+13
-1
lines changed

packages/cli/src/cli/utils/ui.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ import figlet from "figlet";
33
import { vice } from "gradient-string";
44
import readline from "readline";
55
import { colors } from "../constants";
6+
import fs from "fs"; // <-- ADD THIS IMPORT
7+
8+
function isCI(): boolean {
9+
return Boolean(process.env.CI) || fs.existsSync("/.dockerenv");
10+
}
611

712
export async function renderClear() {
813
console.log("\x1Bc");
@@ -37,10 +42,17 @@ export async function renderHero() {
3742
const label3 = "🎮 Join Discord:";
3843
const maxLabelWidth = 17; // Approximate visual width accounting for emoji
3944

45+
// --- ADD THIS LOGIC ---
46+
const isCIEnv = isCI(); // <-- USE THE LOCAL HELPER FUNCTION
47+
const docsUrl = isCIEnv
48+
? "https://lingo.dev/ci"
49+
: "https://lingo.dev/cli";
50+
// ------------------------
51+
4052
console.log(
4153
`${chalk.hex(colors.blue)(label1.padEnd(maxLabelWidth + 1))} ${chalk.hex(
4254
colors.blue,
43-
)("https://lingo.dev/go/docs")}`,
55+
)(docsUrl)}`,
4456
); // Docs emoji seems narrower
4557
console.log(
4658
`${chalk.hex(colors.blue)(label2.padEnd(maxLabelWidth))} ${chalk.hex(

0 commit comments

Comments
 (0)