diff options
Diffstat (limited to 'deps')
-rw-r--r-- | deps/deps.go | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/deps/deps.go b/deps/deps.go index ed073c5d3..d8ba3313e 100644 --- a/deps/deps.go +++ b/deps/deps.go @@ -114,6 +114,11 @@ func New(cfg DepsCfg) (*Deps, error) { return nil, err } + contentSpec, err := helpers.NewContentSpec(cfg.Language) + if err != nil { + return nil, err + } + d := &Deps{ Fs: fs, Log: logger, @@ -121,7 +126,7 @@ func New(cfg DepsCfg) (*Deps, error) { translationProvider: cfg.TranslationProvider, WithTemplate: cfg.WithTemplate, PathSpec: ps, - ContentSpec: helpers.NewContentSpec(cfg.Language), + ContentSpec: contentSpec, Cfg: cfg.Language, Language: cfg.Language, } @@ -139,7 +144,11 @@ func (d Deps) ForLanguage(l *helpers.Language) (*Deps, error) { return nil, err } - d.ContentSpec = helpers.NewContentSpec(l) + d.ContentSpec, err = helpers.NewContentSpec(l) + if err != nil { + return nil, err + } + d.Cfg = l d.Language = l |