Skip to content

Commit 26508fa

Browse files
committed
Making UpdateAssemblyInfo to only consider files under the workingDirectory (this fixes a problem if GitVersion is not located inside the working directory)
1 parent 9ca5b6c commit 26508fa

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

GitVersionExe/AssemblyInfoFileUpdate.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@ static IEnumerable<string> GetAssemblyInfoFiles(string workingDirectory, Argumen
4747
{
4848
if (args.UpdateAssemblyInfoFileName != null)
4949
{
50-
if (File.Exists(args.UpdateAssemblyInfoFileName))
50+
var fullPath = Path.Combine(workingDirectory, args.UpdateAssemblyInfoFileName);
51+
52+
if (File.Exists(fullPath))
5153
{
52-
return new[] { Path.GetFullPath(args.UpdateAssemblyInfoFileName) };
54+
return new[] { fullPath };
5355
}
5456
}
5557

0 commit comments

Comments
 (0)