Skip to content

Commit

Permalink
Make sure there's an env (#67, #68)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgebucaran committed Sep 22, 2021
1 parent 0c60bbd commit dd8046a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import * as tty from "tty"
import { env, platform } from "process"
import process from "process"

const env = process.env || {}

const isDisabled = "NO_COLOR" in env
const isForced = "FORCE_COLOR" in env
const isWindows = platform === "win32"
const isWindows = process.platform === "win32"

const isCompatibleTerminal =
tty && tty.isatty && tty.isatty(1) && env.TERM && env.TERM !== "dumb"
Expand Down

0 comments on commit dd8046a

Please sign in to comment.