From c6e11cbb9dd0663e16697446cce93cab10e53347 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 12 Feb 2018 09:54:51 -0800 Subject: [PATCH] Fix Requires logic in msbuild task --- src/Nerdbank.GitVersioning.Tasks/GetBuildVersion.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Nerdbank.GitVersioning.Tasks/GetBuildVersion.cs b/src/Nerdbank.GitVersioning.Tasks/GetBuildVersion.cs index cb3c1edb..2522b490 100644 --- a/src/Nerdbank.GitVersioning.Tasks/GetBuildVersion.cs +++ b/src/Nerdbank.GitVersioning.Tasks/GetBuildVersion.cs @@ -177,7 +177,7 @@ protected override bool ExecuteInner() { if (!string.IsNullOrEmpty(this.ProjectPathRelativeToGitRepoRoot)) { - Requires.Argument(Path.IsPathRooted(this.ProjectPathRelativeToGitRepoRoot), nameof(this.ProjectPathRelativeToGitRepoRoot), "Path must be relative."); + Requires.Argument(!Path.IsPathRooted(this.ProjectPathRelativeToGitRepoRoot), nameof(this.ProjectPathRelativeToGitRepoRoot), "Path must be relative."); Requires.Argument(!( this.ProjectPathRelativeToGitRepoRoot.Contains(".." + Path.DirectorySeparatorChar) || this.ProjectPathRelativeToGitRepoRoot.Contains(".." + Path.AltDirectorySeparatorChar)),