diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2020-01-31 09:09:11 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2020-01-31 16:36:36 +0100 |
commit | 2bbc865f7bb713b2d0d2dbb02b90ae2621ad5367 (patch) | |
tree | cda2d88ec0079293780028d3f0fe699f839777e7 /commands/commands.go | |
parent | 0792cfa9fae94a06a31e393a46fed3b1dd73b66a (diff) |
commands: Fix config environment handling
Fixes #6503
Fixes #6824
Diffstat (limited to 'commands/commands.go')
-rw-r--r-- | commands/commands.go | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/commands/commands.go b/commands/commands.go index 2187f7aab..66fd9caa4 100644 --- a/commands/commands.go +++ b/commands/commands.go @@ -47,12 +47,12 @@ func (b *commandsBuilder) addAll() *commandsBuilder { b.newServerCmd(), newVersionCmd(), newEnvCmd(), - newConfigCmd(), + b.newConfigCmd(), newCheckCmd(), - newDeployCmd(), - newConvertCmd(), + b.newDeployCmd(), + b.newConvertCmd(), b.newNewCmd(), - newListCmd(), + b.newListCmd(), newImportCmd(), newGenCmd(), createReleaser(), @@ -111,6 +111,12 @@ func (b *commandsBuilder) newBuilderCmd(cmd *cobra.Command) *baseBuilderCmd { return bcmd } +func (b *commandsBuilder) newBuilderBasicCmd(cmd *cobra.Command) *baseBuilderCmd { + bcmd := &baseBuilderCmd{commandsBuilder: b, baseCmd: &baseCmd{cmd: cmd}} + bcmd.hugoBuilderCommon.handleCommonBuilderFlags(cmd) + return bcmd +} + func (c *baseCmd) flagsToConfig(cfg config.Provider) { initializeFlags(c.cmd, cfg) } |