Skip to content

Commit 412e287

Browse files
committed
Add directory separator char for -o
Fixes #45682
1 parent 429f584 commit 412e287

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Cli/dotnet/Extensions/OptionForwardingExtensions.cs

+4
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ public static ForwardedOption<string> ForwardAsOutputPath(this ForwardedOption<s
3636
return [];
3737
}
3838
string argVal = CommandDirectoryContext.GetFullPath(o);
39+
if (!Path.EndsInDirectorySeparator(argVal))
40+
{
41+
argVal += Path.DirectorySeparatorChar;
42+
}
3943
if (surroundWithDoubleQuotes)
4044
{
4145
// Not sure if this is necessary, but this is what "dotnet test" previously did and so we are

0 commit comments

Comments
 (0)