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 committed Mar 3, 2022
1 parent 613f2fc commit e651f50
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 e651f50

Please sign in to comment.