Skip to content

Commit 6005029

Browse files
Never pass in null for authentication of dynamic repositories
1 parent b082835 commit 6005029

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/GitVersionCore/GitPreparer.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,11 @@ public GitPreparer(string targetUrl, string dynamicRepositoryLocation, Authentic
2020
{
2121
this.targetUrl = targetUrl;
2222
this.dynamicRepositoryLocation = dynamicRepositoryLocation;
23-
this.authentication = authentication == null ?
24-
null :
23+
this.authentication =
2524
new AuthenticationInfo
2625
{
27-
Username = authentication.Username,
28-
Password = authentication.Password
26+
Username = authentication?.Username,
27+
Password = authentication?.Password
2928
};
3029
this.noFetch = noFetch;
3130
this.targetPath = targetPath.TrimEnd('/', '\\');

0 commit comments

Comments
 (0)