mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-30 22:39:58 +02:00
@@ -122,10 +122,10 @@ func (t *babelTransformation) Transform(ctx *resources.ResourceTransformationCtx
|
||||
}
|
||||
|
||||
var configFile string
|
||||
logger := t.rs.Logger
|
||||
infol := t.rs.Logger.InfoCommand(binaryName)
|
||||
infoW := loggers.LevelLoggerToWriter(infol)
|
||||
|
||||
var errBuf bytes.Buffer
|
||||
infoW := loggers.LoggerToWriterWithPrefix(logger.Info(), "babel")
|
||||
|
||||
if t.options.Config != "" {
|
||||
configFile = t.options.Config
|
||||
@@ -149,7 +149,7 @@ func (t *babelTransformation) Transform(ctx *resources.ResourceTransformationCtx
|
||||
var cmdArgs []any
|
||||
|
||||
if configFile != "" {
|
||||
logger.Infoln("babel: use config file", configFile)
|
||||
infol.Logf("use config file %q", configFile)
|
||||
cmdArgs = []any{"--config-file", configFile}
|
||||
}
|
||||
|
||||
|
@@ -16,8 +16,7 @@ package babel_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
jww "github.com/spf13/jwalterweatherman"
|
||||
|
||||
"github.com/bep/logg"
|
||||
"github.com/gohugoio/hugo/htesting"
|
||||
"github.com/gohugoio/hugo/hugolib"
|
||||
)
|
||||
@@ -82,7 +81,7 @@ Transpiled3: {{ $transpiled.Permalink }}
|
||||
TxtarString: files,
|
||||
NeedsOsFS: true,
|
||||
NeedsNpmInstall: true,
|
||||
LogLevel: jww.LevelInfo,
|
||||
LogLevel: logg.LevelInfo,
|
||||
}).Build()
|
||||
|
||||
b.AssertLogContains("babel: Hugo Environment: production")
|
||||
|
Reference in New Issue
Block a user