Skip to content

Commit 4d705ce

Browse files
committed
improve no color detection
1 parent 9f5b9ed commit 4d705ce

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dictionary/build.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ export async function build(): Promise<boolean> {
5353
function displayError(source: string, errors: ReadonlyArray<ResultError>) {
5454
let color: boolean;
5555
try {
56-
color = Deno.env.get("NO_COLOR") !== "1";
56+
const noColor = Deno.env.get("NO_COLOR");
57+
color = noColor == null || noColor === "";
5758
} catch (error) {
5859
if (error instanceof Deno.errors.NotCapable) {
5960
color = true;

0 commit comments

Comments
 (0)