aboutsummaryrefslogtreecommitdiffhomepage
path: root/commands/hugo.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2022-06-13 15:28:08 +0200
committerBjørn Erik Pedersen <[email protected]>2022-06-13 18:07:37 +0200
commitcbc35c48d252a1b44e4c30e26cfba2ff462a1f96 (patch)
tree845625eeb385601adce511f0ce972a8cb0347698 /commands/hugo.go
parent44f3c079691f58e31bed31333afed3b7bf3b794f (diff)
downloadhugo-cbc35c48d252a1b44e4c30e26cfba2ff462a1f96.tar.gz
hugo-cbc35c48d252a1b44e4c30e26cfba2ff462a1f96.zip
Respect NO_COLOR
Fixes #10004
Diffstat (limited to 'commands/hugo.go')
-rw-r--r--commands/hugo.go6
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)
}()