Skip to content

Commit d712dff

Browse files
committed
Fix NRE thrown when version property is missing
Fixes #250
1 parent 13cf1df commit d712dff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/NerdBank.GitVersioning/VersionOracle.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public VersionOracle(string projectDirectory, LibGit2Sharp.Repository repo, LibG
9898

9999
this.VersionHeightOffset = this.VersionOptions?.BuildNumberOffsetOrDefault ?? 0;
100100

101-
this.PrereleaseVersion = this.ReplaceMacros(this.VersionOptions?.Version.Prerelease ?? string.Empty);
101+
this.PrereleaseVersion = this.ReplaceMacros(this.VersionOptions?.Version?.Prerelease ?? string.Empty);
102102

103103
this.CloudBuildNumberOptions = this.VersionOptions?.CloudBuild?.BuildNumberOrDefault ?? VersionOptions.CloudBuildNumberOptions.DefaultInstance;
104104

0 commit comments

Comments
 (0)