Skip to content

Commit 2281691

Browse files
committed
fix: only try to remove .git suffix if it exists
Signed-off-by: Chris Laprun <[email protected]>
1 parent 86223a7 commit 2281691

File tree

1 file changed

+2
-1
lines changed
  • bundle-generator/deployment/src/main/java/io/quarkiverse/operatorsdk/bundle/deployment

1 file changed

+2
-1
lines changed

bundle-generator/deployment/src/main/java/io/quarkiverse/operatorsdk/bundle/deployment/BundleProcessor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ private static String getDefaultProviderURLFromSCMInfo(ApplicationInfoBuildItem
140140
if (scmInfo != null) {
141141
var origin = scmInfo.getRemote().get("origin");
142142
if (origin != null) {
143+
System.out.println(origin);
143144
try {
144145
int atSign = origin.indexOf('@');
145146
if (atSign > 0) {
@@ -149,7 +150,7 @@ private static String getDefaultProviderURLFromSCMInfo(ApplicationInfoBuildItem
149150
}
150151

151152
int dotGit = origin.indexOf(".git");
152-
if (dotGit < origin.length() - 1) {
153+
if (dotGit > 0 && dotGit < origin.length() - 1) {
153154
origin = origin.substring(0, dotGit);
154155
}
155156
return origin;

0 commit comments

Comments
 (0)