diff options
Diffstat (limited to 'resources/resource_transformers/babel/babel.go')
-rw-r--r-- | resources/resource_transformers/babel/babel.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/resources/resource_transformers/babel/babel.go b/resources/resource_transformers/babel/babel.go index a4744961e..9a9110f62 100644 --- a/resources/resource_transformers/babel/babel.go +++ b/resources/resource_transformers/babel/babel.go @@ -15,6 +15,7 @@ package babel import ( "bytes" + "fmt" "io" "io/ioutil" "os" @@ -34,7 +35,6 @@ import ( "github.com/gohugoio/hugo/common/herrors" "github.com/gohugoio/hugo/resources" "github.com/gohugoio/hugo/resources/resource" - "github.com/pkg/errors" ) // Options from https://babeljs.io/docs/en/options @@ -141,7 +141,7 @@ func (t *babelTransformation) Transform(ctx *resources.ResourceTransformationCtx configFile = t.rs.BaseFs.ResolveJSConfigFile(configFile) if configFile == "" && t.options.Config != "" { // Only fail if the user specified config file is not found. - return errors.Errorf("babel config %q not found:", configFile) + return fmt.Errorf("babel config %q not found:", configFile) } } @@ -203,7 +203,7 @@ func (t *babelTransformation) Transform(ctx *resources.ResourceTransformationCtx if hexec.IsNotFound(err) { return herrors.ErrFeatureNotAvailable } - return errors.Wrap(err, errBuf.String()) + return fmt.Errorf(errBuf.String()+": %w", err) } content, err := ioutil.ReadAll(compileOutput) |