Skip to content

Commit

Permalink
Replace strings with chars
Browse files Browse the repository at this point in the history
  • Loading branch information
edvilme committed Nov 5, 2024
1 parent edc0f67 commit 9f9f687
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Cli/dotnet/commands/dotnet-sln/list/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ private async Task ListAllProjectsAsync(string solutionFileFullPath, Cancellatio
{
paths = solution.SolutionFolders
// VS-SolutionPersistence does not return a path object, so there might be issues with forward/backward slashes on different platforms
.Select(folder => Path.GetDirectoryName(folder.Path.TrimStart("/")))
.Select(folder => Path.GetDirectoryName(folder.Path.TrimStart('/')))
.ToArray();
}
else
Expand Down
4 changes: 2 additions & 2 deletions test/dotnet-sln.Tests/GivenDotnetSlnList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public void WhenInvalidSolutionIsPassedItPrintsErrorAndUsage(string solutionComm
.Execute(solutionCommand, "InvalidSolution.sln", "list");
cmd.Should().Fail();
cmd.StdErr.Should().Contain(
string.Format(CommonLocalizableStrings.InvalidSolutionFormatString, Path.Combine(projectDirectory, "InvalidSolution.sln"), "").TrimEnd("."));
string.Format(CommonLocalizableStrings.InvalidSolutionFormatString, Path.Combine(projectDirectory, "InvalidSolution.sln"), "").TrimEnd('.'));
cmd.StdOut.Should().BeVisuallyEquivalentToIfNotLocalized("");
}

Expand All @@ -121,7 +121,7 @@ public void WhenInvalidSolutionIsFoundListPrintsErrorAndUsage(string solutionCom
.Execute(solutionCommand, "list");
cmd.Should().Fail();
cmd.StdErr.Should().Contain(
string.Format(CommonLocalizableStrings.InvalidSolutionFormatString, solutionFullPath, "").TrimEnd("."));
string.Format(CommonLocalizableStrings.InvalidSolutionFormatString, solutionFullPath, "").TrimEnd('.'));
cmd.StdOut.Should().BeVisuallyEquivalentToIfNotLocalized("");
}

Expand Down

0 comments on commit 9f9f687

Please sign in to comment.