mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-29 18:42:11 -05:00
resource/bundler: Improve error message
This commit is contained in:
parent
38204c4ab6
commit
4c240800a4
1 changed files with 1 additions and 2 deletions
|
@ -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()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue