Skip to content

Commit

Permalink
Merge pull request #11 from sntran/fix/isTTY
Browse files Browse the repository at this point in the history
fix: isTTY on environment without stdout
  • Loading branch information
fuxingZhang authored Jun 10, 2022
2 parents 94710a9 + 74a2847 commit bf80923
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mod.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { bgGreen, bgWhite, writeAllSync } from "./deps.ts";
export { MultiProgressBar } from "./multi.ts";

const isTTY = Deno.isatty(Deno.stdout.rid);
const isTTY = Deno.stdout && Deno.isatty(Deno.stdout.rid);
const isWindow = Deno.build.os === "windows";

const enum Direction {
Expand Down
2 changes: 1 addition & 1 deletion mod.unstable.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { bgGreen, bgWhite, writeAllSync } from "./deps.ts";

const isTTY = Deno.isatty(Deno.stdout.rid);
const isTTY = Deno.stdout && Deno.isatty(Deno.stdout.rid);
const isWindow = Deno.build.os === "windows";

const enum Direction {
Expand Down
2 changes: 1 addition & 1 deletion multi.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { bgGreen, bgWhite, writeAllSync } from "./deps.ts";

const isTTY = Deno.isatty(Deno.stdout.rid);
const isTTY = Deno.stdout && Deno.isatty(Deno.stdout.rid);
const isWindow = Deno.build.os === "windows";

interface constructorOptions {
Expand Down

0 comments on commit bf80923

Please sign in to comment.