mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-25 22:00:58 +02:00
resource/bundler: Improve error message
This commit is contained in:
@@ -15,7 +15,6 @@
|
|||||||
package bundler
|
package bundler
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
@@ -71,7 +70,7 @@ func (c *Client) Concat(targetPath string, resources resource.Resources) (resour
|
|||||||
// We may improve on that in the future, but then we need to know more.
|
// We may improve on that in the future, but then we need to know more.
|
||||||
for i, r := range resources {
|
for i, r := range resources {
|
||||||
if i > 0 && r.MediaType().Type() != resolvedm.Type() {
|
if i > 0 && r.MediaType().Type() != resolvedm.Type() {
|
||||||
return nil, errors.New("resources in Concat must be of the same Media Type")
|
return nil, fmt.Errorf("resources in Concat must be of the same Media Type, got %q and %q", r.MediaType().Type(), resolvedm.Type())
|
||||||
}
|
}
|
||||||
resolvedm = r.MediaType()
|
resolvedm = r.MediaType()
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user