chore: restrict custom templates by command (#27297)
This commit is contained in:
parent
3b374f7795
commit
9a9527d224
8 changed files with 20 additions and 7 deletions
|
|
@ -522,8 +522,8 @@ func configureEnvironment(cmd *cobra.Command, conf *globalconfig.All) error {
|
|||
|
||||
// setup additional templates
|
||||
if err == nil {
|
||||
if cmd.PersistentFlags().Changed(flagTemplate) {
|
||||
class, err := templates.ClassString(cmd.PersistentFlags().Lookup(flagTemplateType).Value.String())
|
||||
if cmd.Flags().Changed(flagTemplate) {
|
||||
class, err := templates.ClassString(cmd.Flags().Lookup(flagTemplateType).Value.String())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue