diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-03-25 19:48:28 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-03-27 15:43:56 +0200 |
commit | ee4a33b14ff2b0a2d9130415e16d1046f72573f7 (patch) | |
tree | fa0ef27ca1818dadb59f9b21a6b4b1f3cfe8dd11 /commands/commandeer.go | |
parent | 09c88e84d196e6c0943b220cd6526d3473c530b6 (diff) |
commands: Fix broken commandeer
Diffstat (limited to 'commands/commandeer.go')
-rw-r--r-- | commands/commandeer.go | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/commands/commandeer.go b/commands/commandeer.go index 19eadda10..7f7e20f7b 100644 --- a/commands/commandeer.go +++ b/commands/commandeer.go @@ -39,9 +39,22 @@ func (c *commandeer) PathSpec() *helpers.PathSpec { return c.pathSpec } +func (c *commandeer) initFs(fs *hugofs.Fs) error { + c.DepsCfg.Fs = fs + ps, err := helpers.NewPathSpec(fs, c.Cfg) + if err != nil { + return err + } + c.pathSpec = ps + return nil +} + func newCommandeer(cfg *deps.DepsCfg) (*commandeer, error) { - fs := hugofs.NewDefault(cfg.Language) - ps, err := helpers.NewPathSpec(fs, cfg.Cfg) + l := cfg.Language + if l == nil { + l = helpers.NewDefaultLanguage(cfg.Cfg) + } + ps, err := helpers.NewPathSpec(cfg.Fs, l) if err != nil { return nil, err } |