Skip to content

Commit 9f9f687

Browse files
committed
Replace strings with chars
1 parent edc0f67 commit 9f9f687

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Cli/dotnet/commands/dotnet-sln/list/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ private async Task ListAllProjectsAsync(string solutionFileFullPath, Cancellatio
4747
{
4848
paths = solution.SolutionFolders
4949
// VS-SolutionPersistence does not return a path object, so there might be issues with forward/backward slashes on different platforms
50-
.Select(folder => Path.GetDirectoryName(folder.Path.TrimStart("/")))
50+
.Select(folder => Path.GetDirectoryName(folder.Path.TrimStart('/')))
5151
.ToArray();
5252
}
5353
else

test/dotnet-sln.Tests/GivenDotnetSlnList.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public void WhenInvalidSolutionIsPassedItPrintsErrorAndUsage(string solutionComm
101101
.Execute(solutionCommand, "InvalidSolution.sln", "list");
102102
cmd.Should().Fail();
103103
cmd.StdErr.Should().Contain(
104-
string.Format(CommonLocalizableStrings.InvalidSolutionFormatString, Path.Combine(projectDirectory, "InvalidSolution.sln"), "").TrimEnd("."));
104+
string.Format(CommonLocalizableStrings.InvalidSolutionFormatString, Path.Combine(projectDirectory, "InvalidSolution.sln"), "").TrimEnd('.'));
105105
cmd.StdOut.Should().BeVisuallyEquivalentToIfNotLocalized("");
106106
}
107107

@@ -121,7 +121,7 @@ public void WhenInvalidSolutionIsFoundListPrintsErrorAndUsage(string solutionCom
121121
.Execute(solutionCommand, "list");
122122
cmd.Should().Fail();
123123
cmd.StdErr.Should().Contain(
124-
string.Format(CommonLocalizableStrings.InvalidSolutionFormatString, solutionFullPath, "").TrimEnd("."));
124+
string.Format(CommonLocalizableStrings.InvalidSolutionFormatString, solutionFullPath, "").TrimEnd('.'));
125125
cmd.StdOut.Should().BeVisuallyEquivalentToIfNotLocalized("");
126126
}
127127

0 commit comments

Comments
 (0)