-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(gatsby-cli): Convert is-tty to typescript
- Loading branch information
Showing
2 changed files
with
3 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/gatsby-cli/src/util/is-tty.js → packages/gatsby-cli/src/util/is-tty.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
const { isCI } = require(`gatsby-core-utils`) | ||
import { isCI } from "gatsby-core-utils" | ||
|
||
// Some CI pipelines incorrectly report process.stdout.isTTY status, | ||
// which causes unwanted lines in the output. An additional check for isCI helps. | ||
// @see https://github.com/prettier/prettier/blob/36aeb4ce4f620023c8174e826d7208c0c64f1a0b/src/utils/is-tty.js | ||
module.exports = () => process.stdout.isTTY && !isCI() | ||
export const isTTY = (): boolean => process.stdout.isTTY && !isCI() |