fix: prevent panic when image name and stage alias are the same (#3245)

This commit is contained in:
Mick van Gelderen
2024-07-10 09:34:45 -07:00
committed by GitHub
parent 3aa02e0d47
commit e1089414cb
+1 -1
View File
@@ -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 {