Skip to content

Commit

Permalink
Read files as full paths
Browse files Browse the repository at this point in the history
  • Loading branch information
jvyden committed Feb 27, 2023
1 parent b9cbdf6 commit 45eb722
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions MarkdownToDiscord/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@

string? gitModified = Environment.GetEnvironmentVariable("M2D_GIT_MODIFIED");

string[]? gitFiles = null;
IEnumerable<string>? gitFiles = null;
if (gitModified != null)
{
Console.WriteLine("Git modified data is available!");
gitFiles = gitModified.Split('\n', ' ')
.Where(s => !string.IsNullOrWhiteSpace(s))
.Select(Path.GetFullPath)
.ToArray();
.Select(Path.GetFullPath);
}

string[] files = Directory.GetFiles(mdPath);
IEnumerable<string> files = Directory.GetFiles(mdPath)
.Select(Path.GetFullPath);

async Task PostMarkdownFile(IMessageChannel channel, MarkdownParser parser, HttpClient httpClient)
{
Expand Down

0 comments on commit 45eb722

Please sign in to comment.