fix: Main (#2094)
This commit is contained in:
parent
872758b8b0
commit
7b50fc8a57
|
|
@ -69,6 +69,7 @@ type KanikoOptions struct {
|
|||
SingleSnapshot bool
|
||||
Reproducible bool
|
||||
NoPush bool
|
||||
NoPushCache bool
|
||||
Cache bool
|
||||
Cleanup bool
|
||||
CompressedCaching bool
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue