Skip to content

Commit 39ac768

Browse files
authored
Merge pull request #169 from AArnott/user/benmer/NewGetBuildVersionParameterForGitProjectRelativePath
Fix Requires logic in msbuild task
2 parents 286eda9 + c6e11cb commit 39ac768

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Nerdbank.GitVersioning.Tasks/GetBuildVersion.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ protected override bool ExecuteInner()
177177
{
178178
if (!string.IsNullOrEmpty(this.ProjectPathRelativeToGitRepoRoot))
179179
{
180-
Requires.Argument(Path.IsPathRooted(this.ProjectPathRelativeToGitRepoRoot), nameof(this.ProjectPathRelativeToGitRepoRoot), "Path must be relative.");
180+
Requires.Argument(!Path.IsPathRooted(this.ProjectPathRelativeToGitRepoRoot), nameof(this.ProjectPathRelativeToGitRepoRoot), "Path must be relative.");
181181
Requires.Argument(!(
182182
this.ProjectPathRelativeToGitRepoRoot.Contains(".." + Path.DirectorySeparatorChar) ||
183183
this.ProjectPathRelativeToGitRepoRoot.Contains(".." + Path.AltDirectorySeparatorChar)),

0 commit comments

Comments
 (0)