You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by lb...@apache.org on 2019/12/19 17:00:42 UTC

[camel-k] branch master updated: fix(CLI): Cannot set Kaniko cache option

This is an automated email from the ASF dual-hosted git repository.

lburgazzoli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git


The following commit(s) were added to refs/heads/master by this push:
     new 92b635c  fix(CLI): Cannot set Kaniko cache option
92b635c is described below

commit 92b635cddae455d849dde343e90c258112dc5466
Author: Antonin Stefanutti <an...@stefanutti.fr>
AuthorDate: Thu Dec 19 15:57:15 2019 +0100

    fix(CLI): Cannot set Kaniko cache option
---
 pkg/cmd/install.go | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/pkg/cmd/install.go b/pkg/cmd/install.go
index 0048a5b..17ccad2 100644
--- a/pkg/cmd/install.go
+++ b/pkg/cmd/install.go
@@ -140,7 +140,7 @@ type installCmdOptions struct {
 }
 
 // nolint: gocyclo
-func (o *installCmdOptions) install(_ *cobra.Command, _ []string) error {
+func (o *installCmdOptions) install(cobraCmd *cobra.Command, _ []string) error {
 	var collection *kubernetes.Collection
 	if o.OutputFormat != "" {
 		collection = kubernetes.NewCollection()
@@ -280,7 +280,8 @@ func (o *installCmdOptions) install(_ *cobra.Command, _ []string) error {
 			}
 		}
 
-		if !o.KanikoBuildCache {
+		kanikoBuildCacheFlag := cobraCmd.Flags().Lookup("kaniko-build-cache")
+		if kanikoBuildCacheFlag.Changed {
 			platform.Spec.Build.KanikoBuildCache = &o.KanikoBuildCache
 		}