Skip to content

Commit c40ae34

Browse files
committed
Add logging information
1 parent 1bc33f2 commit c40ae34

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/jenkins/plugins/git/GitSCMFileSystem.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,12 +286,14 @@ public SCMFileSystem build(@NonNull Item owner, @NonNull SCM scm, @CheckForNull
286286
UserRemoteConfig config = gitSCM.getUserRemoteConfigs().get(0);
287287
BranchSpec branchSpec = gitSCM.getBranches().get(0);
288288
String remote = config.getUrl();
289+
LogTaskListener listener = new LogTaskListener(LOGGER, Level.FINE);
289290
if (remote == null) {
291+
listener.getLogger().println("Git remote url is null");
292+
listener.close();
290293
return null;
291294
}
292295
String cacheEntry = AbstractGitSCMSource.getCacheEntry(remote);
293296
Lock cacheLock = AbstractGitSCMSource.getCacheLock(cacheEntry);
294-
TaskListener listener = new LogTaskListener(LOGGER, Level.FINE);
295297
cacheLock.lock();
296298
try {
297299
File cacheDir = AbstractGitSCMSource.getCacheDir(cacheEntry);

0 commit comments

Comments
 (0)