Skip to content

Commit

Permalink
Use 'File.AppendLine()' to generate output
Browse files Browse the repository at this point in the history
Let the 'System.IO.File' provider handle newlines between entries rather than manually inserting them
Addresses item 2 of dotnet#726
  • Loading branch information
Hugo-Dahl-Tyler authored and AArnott committed Mar 6, 2022
1 parent 4d9c33d commit b6e44c3
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -28,7 +28,7 @@ internal class GitHubActions : ICloudBuild

public IReadOnlyDictionary<string, string> SetCloudBuildVariable(string name, string value, TextWriter stdout, TextWriter stderr)
{
Utilities.FileOperationWithRetry(() => File.AppendAllText(EnvironmentFile, $"{Environment.NewLine}{name}={value}{Environment.NewLine}"));
Utilities.FileOperationWithRetry(() => File.AppendAllLines(EnvironmentFile, new [] {$"{name}={value}"}));
return GetDictionaryFor(name, value);
}

Expand Down

0 comments on commit b6e44c3

Please sign in to comment.