fix: prevent panic when image name and stage alias are the same (#3245)
This commit is contained in:
parent
3aa02e0d47
commit
e1089414cb
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue