Skip to content

Commit 1a29bc9

Browse files
nickpetrovicAntonio Mansilla
authored andcommitted
Throw exception if no git repos found
1 parent e0431e4 commit 1a29bc9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/jenkinsci/plugins/bitbucket/scm/GitScmAdapter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ public GitScmAdapter(GitSCM scm, Run<?, ?> build) {
4949

5050
public Map<String, URIish> getCommitRepoMap() throws Exception {
5151
List<RemoteConfig> repoList = this.gitScm.getRepositories();
52-
if (repoList.size() != 1) {
53-
throw new Exception("None or multiple repos");
52+
if (repoList.size() < 1) {
53+
throw new Exception("No repos found");
5454
}
5555

5656
HashMap<String, URIish> commitRepoMap = new HashMap<String, URIish>();

0 commit comments

Comments
 (0)