mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-28 14:40:43 +03:00
parent
7ce033a89d
commit
8a69ccbb00
16 changed files with 86 additions and 71 deletions
|
@ -293,7 +293,8 @@ func (c *modCommands) Run(ctx context.Context, cd *simplecobra.Commandeer, args
|
|||
return nil
|
||||
}
|
||||
|
||||
func (c *modCommands) WithCobraCommand(cmd *cobra.Command) error {
|
||||
func (c *modCommands) Init(cd *simplecobra.Commandeer) error {
|
||||
cmd := cd.CobraCommand
|
||||
cmd.Short = "Various Hugo Modules helpers."
|
||||
cmd.Long = `Various helpers to help manage the modules in your project's dependency graph.
|
||||
Most operations here requires a Go version installed on your system (>= Go 1.12) and the relevant VCS client (typically Git).
|
||||
|
@ -304,7 +305,7 @@ This is not needed if you only operate on modules inside /themes or if you have
|
|||
return nil
|
||||
}
|
||||
|
||||
func (c *modCommands) Init(cd, runner *simplecobra.Commandeer) error {
|
||||
func (c *modCommands) PreRun(cd, runner *simplecobra.Commandeer) error {
|
||||
c.r = cd.Root.Command.(*rootCommand)
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue