mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-28 22:19:59 +02:00
Revert "postcss: Improve validation of option 'config'"
This reverts commit 9a0370e8eb
.
Closes #10990
This commit is contained in:
@@ -134,17 +134,13 @@ func (t *babelTransformation) Transform(ctx *resources.ResourceTransformationCtx
|
||||
}
|
||||
|
||||
configFile = filepath.Clean(configFile)
|
||||
isConfigFileDir := false
|
||||
|
||||
// We need an absolute filename to the config file.
|
||||
if !filepath.IsAbs(configFile) {
|
||||
configFile, isConfigFileDir = t.rs.BaseFs.ResolveJSConfigFile(configFile)
|
||||
if isConfigFileDir {
|
||||
logger.Warnf("babel config %q must be a file, not a directory", configFile)
|
||||
}
|
||||
configFile = t.rs.BaseFs.ResolveJSConfigFile(configFile)
|
||||
if configFile == "" && t.options.Config != "" {
|
||||
// Only fail if the user specified config file is not found.
|
||||
return fmt.Errorf("babel config file %q not found", configFile)
|
||||
return fmt.Errorf("babel config %q not found:", configFile)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user