Skip to content

Commit

Permalink
Merge pull request #32 from UpCloudLtd/fix-cmd-load
Browse files Browse the repository at this point in the history
fix: load temporary config before build cmd
  • Loading branch information
kaminek authored Mar 10, 2021
2 parents 705ad30 + 11a6df3 commit b5670b1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/upctl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,16 @@ func (s *mainCommand) InitCommand() {
s, config.New(mainConfig.Viper()),
)

//XXX: should be moved when build commands is reworked
if loader := s.ConfigLoader(); loader != nil {
_ = loader(s.Config())
}

all.BuildCommands(s, s.Config())

s.Cobra().SetUsageTemplate(ui.CommandUsageTemplate())
s.Cobra().SetUsageFunc(ui.UsageFunc)

}

func (s *mainCommand) MakePersistentPreExecuteCommand() func(args []string) error {
Expand Down

0 comments on commit b5670b1

Please sign in to comment.