Skip to content

Commit

Permalink
refactor: check file info error
Browse files Browse the repository at this point in the history
natesales committed Nov 11, 2023

Verified

This commit was signed with the committer’s verified signature.
1 parent 06bfa99 commit 0e2e8cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ func clearOpts() {
opts.ShortTTLs = true

// Enable color output if stdout is a terminal
if fileInfo, _ := os.Stdout.Stat(); (fileInfo.Mode() & os.ModeCharDevice) != 0 {
if fileInfo, err := os.Stdout.Stat(); err != nil && (fileInfo.Mode()&os.ModeCharDevice) != 0 {
opts.Color = true
}

0 comments on commit 0e2e8cd

Please sign in to comment.