Skip to content

Commit a55eeee

Browse files
committed
emit error to inform users of missing vsa backend
* In case a user supplied --vsa flag but did not supply --vsa-upload flag, the user will now get an error. * The error will inform them that the VSAs were generated but not uploaded anywhere because of missing --vsa-upload flag. resolves: EC-1309
1 parent 0d7cd05 commit a55eeee

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

cmd/validate/image.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,16 @@ func validateImageCmd(validate imageValidationFunc) *cobra.Command {
516516
log.Errorf("[VSA] Upload failed for snapshot: %v", uploadErr)
517517
}
518518
}
519+
} else {
520+
// No upload backends configured - inform user about next steps
521+
totalFiles := len(vsaResult.ComponentEnvelopes)
522+
if vsaResult.SnapshotEnvelope != "" {
523+
totalFiles++
524+
}
525+
526+
if totalFiles > 0 {
527+
log.Errorf("[VSA] VSA files generated but not uploaded (no --vsa-upload backends specified)")
528+
}
519529
}
520530
}
521531
}

0 commit comments

Comments
 (0)