Skip to content

Commit

Permalink
Fix StringIndexOutOfBoundsException on openShiftBuildWaitForFinish (#…
Browse files Browse the repository at this point in the history
…8484)

Signed-off-by: Federico Valeri <fedevaleri@gmail.com>
  • Loading branch information
fvaleri committed May 5, 2023
1 parent 6fcab66 commit 0d5bfa4
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -379,7 +379,7 @@ private Future<String> openShiftBuildWaitForFinish(Reconciliation reconciliation
&& build.getStatus().getOutput().getTo().getImageDigest() != null) {
String digest = "@" + build.getStatus().getOutput().getTo().getImageDigest();
String image = build.getStatus().getOutputDockerImageReference();
String tag = image.substring(image.lastIndexOf(":"));
String tag = image.lastIndexOf(":") != -1 ? image.substring(image.lastIndexOf(":")) : "latest";

String imageWithDigest = image.replace(tag, digest);

Expand Down

0 comments on commit 0d5bfa4

Please sign in to comment.