This commit is contained in:
Gabriel Nützi
2022-05-17 13:27:24 -04:00
committed by GitHub
parent 872758b8b0
commit 7b50fc8a57
2 changed files with 5 additions and 5 deletions
+1
View File
@@ -69,6 +69,7 @@ type KanikoOptions struct {
SingleSnapshot bool
Reproducible bool
NoPush bool
NoPushCache bool
Cache bool
Cleanup bool
CompressedCaching bool
+4 -5
View File
@@ -79,12 +79,11 @@ var (
func CheckPushPermissions(opts *config.KanikoOptions) error {
targets := opts.Destinations
// When no push and no push cache are set, we don't need to check permissions
if opts.NoPush && opt.noPushCache {
if opts.NoPush && opts.NoPushCache {
targets = []string{}
}
// When no push is set, we want to check permissions for the cache repo
// instead of the destinations
else if opts.NoPush && ! opt.noPushCache {
} else if opts.NoPush && !opts.NoPushCache {
// When no push is set, we want to check permissions for the cache repo
// instead of the destinations
targets = []string{opts.CacheRepo}
}