mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-10-09 16:26:10 +02:00
fix: prevent panic when image name and stage alias are the same (#3245)
This commit is contained in:
@@ -74,7 +74,7 @@ func baseImageIndex(currentStage int, stages []instructions.Stage) int {
|
||||
currentStageBaseName := strings.ToLower(stages[currentStage].BaseName)
|
||||
|
||||
for i, stage := range stages {
|
||||
if i > currentStage {
|
||||
if i >= currentStage {
|
||||
break
|
||||
}
|
||||
if stage.Name == currentStageBaseName {
|
||||
|
||||
Reference in New Issue
Block a user