From 26508fadd07a096ca6f73e04c36478cc21ddc581 Mon Sep 17 00:00:00 2001 From: Igal Tabachnik Date: Sun, 2 Nov 2014 15:29:05 +0200 Subject: [PATCH] Making UpdateAssemblyInfo to only consider files under the workingDirectory (this fixes a problem if GitVersion is not located inside the working directory) --- GitVersionExe/AssemblyInfoFileUpdate.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/GitVersionExe/AssemblyInfoFileUpdate.cs b/GitVersionExe/AssemblyInfoFileUpdate.cs index 36a7f2f130..ea96ece3be 100644 --- a/GitVersionExe/AssemblyInfoFileUpdate.cs +++ b/GitVersionExe/AssemblyInfoFileUpdate.cs @@ -47,9 +47,11 @@ static IEnumerable GetAssemblyInfoFiles(string workingDirectory, Argumen { if (args.UpdateAssemblyInfoFileName != null) { - if (File.Exists(args.UpdateAssemblyInfoFileName)) + var fullPath = Path.Combine(workingDirectory, args.UpdateAssemblyInfoFileName); + + if (File.Exists(fullPath)) { - return new[] { Path.GetFullPath(args.UpdateAssemblyInfoFileName) }; + return new[] { fullPath }; } }