diff options
author | Bjørn Erik Pedersen <[email protected]> | 2022-05-14 15:51:04 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2022-05-15 20:25:25 +0200 |
commit | 4b189d8fd93d3fa326b31d451d5594c917e6c714 (patch) | |
tree | c3515876c474caab2df6d0a34291bcc3ca8e75df /parser | |
parent | c2fa0a33209da7cfd9a09f8fc528415578a9edf8 (diff) | |
download | hugo-4b189d8fd93d3fa326b31d451d5594c917e6c714.tar.gz hugo-4b189d8fd93d3fa326b31d451d5594c917e6c714.zip |
postcss: Fix import error handling
Note that we will now fail if `inlineImports` is enabled and we cannot resolve an import.
You can work around this by either:
* Use url imports or imports with media queries.
* Set `skipInlineImportsNotFound=true` in the options
Also get the argument order in the different NewFileError* funcs in line.
Fixes #9895
Diffstat (limited to 'parser')
-rw-r--r-- | parser/metadecoders/decoder.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/parser/metadecoders/decoder.go b/parser/metadecoders/decoder.go index fe0581734..42e2ee65a 100644 --- a/parser/metadecoders/decoder.go +++ b/parser/metadecoders/decoder.go @@ -260,7 +260,7 @@ func (d Decoder) unmarshalORG(data []byte, v any) error { } func toFileError(f Format, data []byte, err error) error { - return herrors.NewFileError(fmt.Sprintf("_stream.%s", f), err).UpdateContent(bytes.NewReader(data), nil) + return herrors.NewFileError(err, fmt.Sprintf("_stream.%s", f)).UpdateContent(bytes.NewReader(data), nil) } // stringifyMapKeys recurses into in and changes all instances of |