Skip to content

Commit

Permalink
fix: make isInteractive sync again!
Browse files Browse the repository at this point in the history
  • Loading branch information
eliassjogreen committed Sep 15, 2021
1 parent f6c4a90 commit 65d1443
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion is_interactive.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export async function isInteractive(stream: { rid: number }): Promise<boolean> {
export async function isInteractiveAsync(stream: { rid: number }): Promise<boolean> {
if (await Deno.permissions.query({ name: "env" })) {
return (
Deno.isatty(stream.rid) &&
Expand All @@ -8,3 +8,7 @@ export async function isInteractive(stream: { rid: number }): Promise<boolean> {
}
return Deno.isatty(stream.rid);
}

export function isInteractive(stream: { rid: number }): boolean {
return Deno.isatty(stream.rid);
}

0 comments on commit 65d1443

Please sign in to comment.