diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-05-14 15:51:04 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-05-15 20:25:25 +0200 |
commit | 4b189d8fd93d3fa326b31d451d5594c917e6c714 (patch) | |
tree | c3515876c474caab2df6d0a34291bcc3ca8e75df /transform/chain.go | |
parent | c2fa0a33209da7cfd9a09f8fc528415578a9edf8 (diff) |
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 'transform/chain.go')
-rw-r--r-- | transform/chain.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/transform/chain.go b/transform/chain.go index 2d70b9356..31d1e804b 100644 --- a/transform/chain.go +++ b/transform/chain.go @@ -113,9 +113,9 @@ func (c *Chain) Apply(to io.Writer, from io.Reader) error { filename = tempfile.Name() defer tempfile.Close() _, _ = io.Copy(tempfile, fb.from) - return herrors.NewFileErrorFromFile(err, filename, filename, hugofs.Os, nil) + return herrors.NewFileErrorFromFile(err, filename, hugofs.Os, nil) } - return herrors.NewFileError(filename, err).UpdateContent(fb.from, nil) + return herrors.NewFileError(err, filename).UpdateContent(fb.from, nil) } } |