File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
packages/cli/src/cli/utils Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,11 @@ import figlet from "figlet";
33import { vice } from "gradient-string" ;
44import readline from "readline" ;
55import { 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
712export 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 (
You can’t perform that action at this time.
0 commit comments