Skip to content

Commit b8ffe2a

Browse files
committed
Merge branch 'static-ci' of https://github.com/Mist3rBru/clack into static-ci
2 parents c45d1c9 + b4f2ba2 commit b8ffe2a

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

packages/prompts/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
},
5555
"dependencies": {
5656
"@clack/core": "workspace:*",
57+
"ci-info": "^3.8.0",
5758
"picocolors": "^1.0.0",
5859
"sisteransi": "^1.0.5"
5960
},

packages/prompts/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ import {
88
SelectKeyPrompt,
99
SelectPrompt,
1010
State,
11-
TextPrompt
11+
TextPrompt,
1212
} from '@clack/core';
13+
import { isCI } from 'ci-info';
1314
import isUnicodeSupported from 'is-unicode-supported';
1415
import color from 'picocolors';
1516
import { cursor, erase } from 'sisteransi';
@@ -637,7 +638,6 @@ export const log = {
637638
export const spinner = () => {
638639
const frames = unicode ? ['◒', '◐', '◓', '◑'] : ['•', 'o', 'O', '0'];
639640
const delay = unicode ? 80 : 120;
640-
const isCI = process.env.GITHUB_ACTIONS === 'true';
641641

642642
let unblock: () => void;
643643
let loop: NodeJS.Timeout;
@@ -673,7 +673,7 @@ export const spinner = () => {
673673
};
674674

675675
const clearPrevMessage = () => {
676-
if (!_prevMessage) return;
676+
if (_prevMessage === undefined) return;
677677
if (isCI) process.stdout.write('\n');
678678
const prevLines = _prevMessage.split('\n');
679679
process.stdout.write(cursor.move(-999, prevLines.length - 1));

pnpm-lock.yaml

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)