Skip to content

Commit

Permalink
If stderr is not a tty, be silent by default
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Jun 12, 2023
1 parent 2201355 commit 8c6f8f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</p>


# tea/cli 0.35.4
# tea/cli 0.35.5

`tea` puts the whole open source ecosystem at your fingertips:

Expand Down
6 changes: 5 additions & 1 deletion src/hooks/useConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,13 @@ function getVerbosity(env: Record<string, string>, sequences_ok: boolean): Verbo
const verbosity = flatmap(VERBOSE, parseInt)
if (isNumber(verbosity)) {
return verbosity
} else if (parseBool(CI) || !sequences_ok) {
} else if (parseBool(CI)) {
// prevents dumping 100s of lines of download progress
return Verbosity.quiet
} else if (!Deno.isatty(Deno.stderr.rid)) {
return Verbosity.silent
} else if (!sequences_ok) {
return Verbosity.quiet
} else {
return Verbosity.normal
}
Expand Down

0 comments on commit 8c6f8f6

Please sign in to comment.