Skip to content
This repository was archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
Merge pull request #187 from jairbubbles/patch-1
Browse files Browse the repository at this point in the history
Fix crash when running GitLink directly from command line
  • Loading branch information
GeertvanHorrik authored Jan 19, 2018
2 parents d848908 + fac808e commit affdd1d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/GitLink/Linker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,11 @@ public static class Linker
try
{
Repository repo = repository.Value;
repoSourceFiles = sourceFiles
.Where(f => !f.StartsWithIgnoreCase(options.IntermediateOutputPath))
.ToDictionary(e => e, e => repo.GetNormalizedPath(e));

var files = string.IsNullOrEmpty(options.IntermediateOutputPath) ?
sourceFiles : sourceFiles.Where(f => !f.StartsWithIgnoreCase(options.IntermediateOutputPath));

repoSourceFiles = files.ToDictionary(e => e, e => repo.GetNormalizedPath(e));
}
catch (RepositoryNotFoundException)
{
Expand Down Expand Up @@ -310,4 +312,4 @@ private static string ReplaceSlashes(IProvider provider, string relativePathForU
return relativePathForUrl;
}
}
}
}

0 comments on commit affdd1d

Please sign in to comment.