File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -237,14 +237,20 @@ func runK0sKubeconfig(ctx context.Context) error {
237237func runOutro (c * cli.Context ) error {
238238 os .Setenv ("KUBECONFIG" , defaults .PathToConfig ("kubeconfig" ))
239239 opts := []addons.Option {}
240- if c .String ("overrides" ) == "" {
241- return addons .NewApplier (opts ... ).Outro (c .Context )
240+ if c .String ("license" ) != "" {
241+ license , err := helpers .ParseLicense (c .String ("license" ))
242+ if err != nil {
243+ return fmt .Errorf ("unable to parse license: %w" , err )
244+ }
245+ opts = append (opts , addons .WithLicense (license ))
242246 }
243- eucfg , err := helpers .ParseEndUserConfig (c .String ("overrides" ))
244- if err != nil {
245- return fmt .Errorf ("unable to load overrides: %w" , err )
247+ if c .String ("overrides" ) != "" {
248+ eucfg , err := helpers .ParseEndUserConfig (c .String ("overrides" ))
249+ if err != nil {
250+ return fmt .Errorf ("unable to load overrides: %w" , err )
251+ }
252+ opts = append (opts , addons .WithEndUserConfig (eucfg ))
246253 }
247- opts = append (opts , addons .WithEndUserConfig (eucfg ))
248254 return addons .NewApplier (opts ... ).Outro (c .Context )
249255}
250256
You can’t perform that action at this time.
0 commit comments