fix: Main (#2094)
This commit is contained in:
parent
872758b8b0
commit
7b50fc8a57
|
|
@ -69,6 +69,7 @@ type KanikoOptions struct {
|
||||||
SingleSnapshot bool
|
SingleSnapshot bool
|
||||||
Reproducible bool
|
Reproducible bool
|
||||||
NoPush bool
|
NoPush bool
|
||||||
|
NoPushCache bool
|
||||||
Cache bool
|
Cache bool
|
||||||
Cleanup bool
|
Cleanup bool
|
||||||
CompressedCaching bool
|
CompressedCaching bool
|
||||||
|
|
|
||||||
|
|
@ -79,12 +79,11 @@ var (
|
||||||
func CheckPushPermissions(opts *config.KanikoOptions) error {
|
func CheckPushPermissions(opts *config.KanikoOptions) error {
|
||||||
targets := opts.Destinations
|
targets := opts.Destinations
|
||||||
// When no push and no push cache are set, we don't need to check permissions
|
// 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{}
|
targets = []string{}
|
||||||
}
|
} else if opts.NoPush && !opts.NoPushCache {
|
||||||
// When no push is set, we want to check permissions for the cache repo
|
// When no push is set, we want to check permissions for the cache repo
|
||||||
// instead of the destinations
|
// instead of the destinations
|
||||||
else if opts.NoPush && ! opt.noPushCache {
|
|
||||||
targets = []string{opts.CacheRepo}
|
targets = []string{opts.CacheRepo}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue