Skip to content

Commit

Permalink
chore(gatsby-cli): Convert is-tty to typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
mottox2 committed Mar 14, 2020
1 parent 5ed9a64 commit b14fb63
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 1 addition & 5 deletions packages/gatsby-cli/src/init-starter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,9 @@ import sysPath from "path"
import prompts from "prompts"
import url from "url"

<<<<<<< HEAD
import { getPackageManager, promptPackageManager } from "./util/package-manager"
=======
import report from "./reporter"
import { getPackageManager, promptPackageManager } from "./util/configstore"
>>>>>>> Update packages/gatsby-cli/src/init-starter.ts
import isTTY from "./util/is-tty"
import { isTTY } from "./util/is-tty"

const spawnWithArgs = (
file: string,
Expand Down
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()

0 comments on commit b14fb63

Please sign in to comment.