diff options
author | Bjørn Erik Pedersen <[email protected]> | 2022-06-13 15:28:08 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2022-06-13 18:07:37 +0200 |
commit | cbc35c48d252a1b44e4c30e26cfba2ff462a1f96 (patch) | |
tree | 845625eeb385601adce511f0ce972a8cb0347698 /commands/hugo.go | |
parent | 44f3c079691f58e31bed31333afed3b7bf3b794f (diff) | |
download | hugo-cbc35c48d252a1b44e4c30e26cfba2ff462a1f96.tar.gz hugo-cbc35c48d252a1b44e4c30e26cfba2ff462a1f96.zip |
Respect NO_COLOR
Fixes #10004
Diffstat (limited to 'commands/hugo.go')
-rw-r--r-- | commands/hugo.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/commands/hugo.go b/commands/hugo.go index f10fec00b..5169d65a5 100644 --- a/commands/hugo.go +++ b/commands/hugo.go @@ -284,10 +284,6 @@ func setValueFromFlag(flags *flag.FlagSet, key string, cfg config.Provider, targ } } -func isTerminal() bool { - return terminal.IsTerminal(os.Stdout) -} - func (c *commandeer) fullBuild(noBuildLock bool) error { var ( g errgroup.Group @@ -297,7 +293,7 @@ func (c *commandeer) fullBuild(noBuildLock bool) error { if !c.h.quiet { fmt.Println("Start building sites … ") fmt.Println(hugo.BuildVersionString()) - if isTerminal() { + if terminal.IsTerminal(os.Stdout) { defer func() { fmt.Print(showCursor + clearLine) }() |