Skip to content

Commit c6f2c95

Browse files
Fix WriteVersionInfoTest failure (pad parameter validation/passing)
1 parent 9a1ae70 commit c6f2c95

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/GitVersion.Core/Helpers/OperationWithExponentialBackoff.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public OperationWithExponentialBackoff(IThreadSleep threadSleep, ILog log, Func<
3131
throw new ArgumentOutOfRangeException(nameof(maxRetries));
3232

3333
this.threadSleep = threadSleep ?? throw new ArgumentNullException(nameof(threadSleep));
34-
this.log = log;
34+
this.log = log ?? throw new ArgumentNullException(nameof(log));
3535
this.operation = operation;
3636
this.maxRetries = maxRetries;
3737
}

src/GitVersion.Core/Model/VersionVariables.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,9 @@ public static VersionVariables FromJson(string json)
168168

169169
public static VersionVariables FromFile(string filePath, IFileSystem fileSystem, ILog log)
170170
{
171-
var retryOperation = new OperationWithExponentialBackoff<IOException, VersionVariables>(new ThreadSleep(), null, () => FromFileInternal(filePath, fileSystem));
172-
171+
var retryOperation = new OperationWithExponentialBackoff<IOException, VersionVariables>(new ThreadSleep(), log, () => FromFileInternal(filePath, fileSystem));
173172
var versionVariables = retryOperation.ExecuteAsync().Result;
174173
return versionVariables;
175-
176174
}
177175
private static VersionVariables FromFileInternal(string filePath, IFileSystem fileSystem)
178176
{

0 commit comments

Comments
 (0)