Skip to content

Commit 7e54c25

Browse files
jjonesczCopilot
andauthored
Clarify assertion message in a run-file test (#50169)
Co-authored-by: Copilot <[email protected]>
1 parent 5da79c0 commit 7e54c25

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/dotnet.Tests/CommandTests/Run/RunFileTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2151,7 +2151,7 @@ public static IEnumerable<string> GetPathsOfCscInputsFromNuGetCache()
21512151
{
21522152
Log.WriteLine($"{codeFilePath.FullName} needs to be updated:");
21532153
Log.WriteLine(newText);
2154-
if (Environment.GetEnvironmentVariable("CI") == "true")
2154+
if (Env.GetEnvironmentVariableAsBool("CI"))
21552155
{
21562156
throw new InvalidOperationException($"Not updating file in CI: {codeFilePath.FullName}");
21572157
}
@@ -2278,7 +2278,7 @@ Hello from {programName}
22782278
var msbuildFileText = File.ReadAllText(msbuildFile);
22792279
if (cscOnlyFileText.ReplaceLineEndings() != msbuildFileText.ReplaceLineEndings())
22802280
{
2281-
Log.WriteLine($"File differs between MSBuild and CSC-only runs: {cscOnlyFile}");
2281+
Log.WriteLine($"File differs between MSBuild and CSC-only runs (if this is expected, find the template in '{nameof(CSharpCompilerCommand)}.cs' and update it): {cscOnlyFile}");
22822282
const int limit = 3_000;
22832283
if (cscOnlyFileText.Length < limit && msbuildFileText.Length < limit)
22842284
{

0 commit comments

Comments
 (0)