8000 Add trailing slash for -o Fixes #45682 by Forgind · Pull Request #48640 · dotnet/sdk · GitHub
[go: up one dir, main page]

Skip to content

Add trailing slash for -o Fixes #45682 #48640

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
Adjust some tests
  • Loading branch information
Forgind committed Apr 23, 2025
commit e41488c3a6884bb261d1b0f41099c3a85148db06
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

[Theory]
[InlineData(new string[] { }, new string[] { })]
[InlineData(new string[] { "-o", "foo" }, new string[] { "-property:OutputPath=<cwd>foo", "-property:_CommandLineDefinedOutputPath=true" })]
[InlineData(new string[] { "-o", "myoutput" }, new string[] { "-property:OutputPath=<cwd>myoutput", "-property:_CommandLineDefinedOutputPath=true" })]
[InlineData(new string[] { "-property:Verbosity=diag" }, new string[] { "--property:Verbosity=diag" })]
[InlineData(new string[] { "--output", "foo" }, new string[] { "-property:OutputPath=<cwd>foo", "-property:_CommandLineDefinedOutputPath=true" })]
[InlineData(new string[] { "--output", "myoutput" }, new string[] { "-property:OutputPath=<cwd>myoutput", "-property:_CommandLineDefinedOutputPath=true" })]
[InlineData(new string[] { "--artifacts-path", "foo" }, new string[] { "-property:ArtifactsPath=<cwd>foo" })]
[InlineData(new string[] { "-o", "foo1 foo2" }, new string[] { "-property:OutputPath=<cwd>foo1 foo2", "-property:_CommandLineDefinedOutputPath=true" })]
[InlineData(new string[] { "-o", "foo1 myoutput" }, new string[] { "-property:OutputPath=<cwd>foo1 myoutput", "-property:_CommandLineDefinedOutputPath=true" })]
[InlineData(new string[] { "--no-incremental" }, new string[] { "-target:Rebuild" })]
[InlineData(new string[] { "-r", "rid" }, new string[] { "-property:RuntimeIdentifier=rid", "-property:_CommandLineDefinedRuntimeIdentifier=true" })]
[InlineData(new string[] { "-r", "linux-amd64" }, new string[] { "-property:RuntimeIdentifier=linux-x64", "-property:_CommandLineDefinedRuntimeIdentifier=true" })]
Expand All @@ -42,7 +42,7 @@
{
CommandDirectoryContext.PerformActionWithBasePath(WorkingDirectory, () =>
{
expectedAdditionalArgs = expectedAdditionalArgs.Select(arg => arg.Replace("<cwd>", WorkingDirectory)).ToArray();
expectedAdditionalArgs = expectedAdditionalArgs.Select(arg => arg.Replace("<cwd>", WorkingDirectory).Replace("myoutput", "myoutput" + Path.DirectorySeparatorChar)).ToArray();

var msbuildPath = "<msbuildpath>";
var command = BuildCommand.FromArgs(args, msbuildPath);
Expand Down Expand Up @@ -85,12 +85,12 @@
CommandDirectoryContext.PerformActionWithBasePath(WorkingDirectory, () =>
{
expectedAdditionalArgsForRestore = expectedAdditionalArgsForRestore
.Select(arg => arg.Replace("<cwd>", WorkingDirectory))
.Select(arg => arg.Replace("<cwd>", WorkingDirectory).Replace("myoutput", "myoutput" + Path.DirectorySeparatorChar)
.ToArray();

Check failure on line 89 in test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TemplateEngine: macOS (x64))

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs#L89

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs(89,31): error CS1026: (NETCORE_ENGINEERING_TELEMETRY=Build) ) expected

Check failure on line 89 in test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build AoT: macOS (x64))

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs#L89

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs(89,31): error CS1026: (NETCORE_ENGINEERING_TELEMETRY=Build) ) expected

Check failure on line 89 in test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TestBuild: macOS (x64))

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs#L89

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs(89,31): error CS1026: (NETCORE_ENGINEERING_TELEMETRY=Build) ) expected

Check failure on line 89 in test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TestBuild: linux (arm64))

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs#L89

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs(89,31): error CS1026: (NETCORE_ENGINEERING_TELEMETRY=Build) ) expected

Check failure on line 89 in test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TestBuild: linux (x64))

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs#L89

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs(89,31): error CS1026: (NETCORE_ENGINEERING_TELEMETRY=Build) ) expected

Check failure on line 89 in test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TemplateEngine: linux (x64))

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs#L89

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs(89,31): error CS1026: (NETCORE_ENGINEERING_TELEMETRY=Build) ) expected

Check failure on line 89 in test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build ContainerBased: linux (x64) [fedora39])

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs#L89

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs(89,31): error CS1026: (NETCORE_ENGINEERING_TELEMETRY=Build) ) expected

Check failure on line 89 in test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build ContainerBased: linux (x64) [ubuntu2204DebPkg])

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs#L89

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs(89,31): error CS1026: (NETCORE_ENGINEERING_TELEMETRY=Build) ) expected

Check failure on line 89 in test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build ContainerBased: linux (x64) [centosStream9])

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs#L89

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs(89,31): error CS1026: (NETCORE_ENGINEERING_TELEMETRY=Build) ) expected

Check failure on line 89 in test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build ContainerBased: linux (x64) [alpine319WithNode])

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs#L89

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs(89,31): error CS1026: (NETCORE_ENGINEERING_TELEMETRY=Build) ) expected

Check failure on line 89 in test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build ContainerBased: linux (x64) [debian12Amd64])

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs#L89

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs(89,31): error CS1026: (NETCORE_ENGINEERING_TELEMETRY=Build) ) expected

Check failure on line 89 in test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs#L89

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs(89,31): error CS1026: (NETCORE_ENGINEERING_TELEMETRY=Build) ) expected

Check failure on line 89 in test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs#L89

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs(89,31): error CS1026: (NETCORE_ENGINEERING_TELEMETRY=Build) ) expected

expectedAdditionalArgs = expectedAdditionalArgs
.Select(arg => arg.Replace("<cwd>", WorkingDirectory))
.Select(arg => arg.Replace("<cwd>", WorkingDirectory).Replace("myoutput", "myoutput" + Path.DirectorySeparatorChar)
.ToArray();

Check failure on line 93 in test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TemplateEngine: macOS (x64))

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs#L93

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs(93,31): error CS1026: (NETCORE_ENGINEERING_TELEMETRY=Build) ) expected

Check failure on line 93 in test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build AoT: macOS (x64))

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs#L93

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs(93,31): error CS1026: (NETCORE_ENGINEERING_TELEMETRY=Build) ) expected

Check failure on line 93 in test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TestBuild: macOS (x64))

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs#L93

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs(93,31): error CS1026: (NETCORE_ENGINEERING_TELEMETRY=Build) ) expected

Check failure on line 93 in test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TestBuild: linux (arm64))

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs#L93

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs(93,31): error CS1026: (NETCORE_ENGINEERING_TELEMETRY=Build) ) expected

Check failure on line 93 in test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TestBuild: linux (x64))

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs#L93

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs(93,31): error CS1026: (NETCORE_ENGINEERING_TELEMETRY=Build) ) expected

Check failure on line 93 in test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TemplateEngine: linux (x64))

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs#L93

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs(93,31): error CS1026: (NETCORE_ENGINEERING_TELEMETRY=Build) ) expected

Check failure on line 93 in test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build ContainerBased: linux (x64) [fedora39])

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs#L93

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs(93,31): error CS1026: (NETCORE_ENGINEERING_TELEMETRY=Build) ) expected

Check failure on line 93 in test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build ContainerBased: linux (x64) [ubuntu2204DebPkg])

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs#L93

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs(93,31): error CS1026: (NETCORE_ENGINEERING_TELEMETRY=Build) ) expected

Check failure on line 93 in test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build ContainerBased: linux (x64) [centosStream9])

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs#L93

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs(93,31): error CS1026: (NETCORE_ENGINEERING_TELEMETRY=Build) ) expected

Check failure on line 93 in test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build ContainerBased: linux (x64) [alpine319WithNode])

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs#L93

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs(93,31): error CS1026: (NETCORE_ENGINEERING_TELEMETRY=Build) ) expected

Check failure on line 93 in test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build ContainerBased: linux (x64) [debian12Amd64])

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs#L93

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs(93,31): error CS1026: (NETCORE_ENGINEERING_TELEMETRY=Build) ) expected

Check failure on line 93 in test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs#L93

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs(93,31): error CS1026: (NETCORE_ENGINEERING_TELEMETRY=Build) ) expected

Check failure on line 93 in test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs#L93

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetBuildInvocation.cs(93,31): error CS1026: (NETCORE_ENGINEERING_TELEMETRY=Build) ) expected

var msbuildPath = "<msbuildpath>";
var command = BuildCommand.FromArgs(args, msbuildPath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void MsbuildInvocationIsCorrect(string[] args, string[] expectedAdditiona
CommandDirectoryContext.PerformActionWithBasePath(WorkingDirectory, () =>
{
expectedAdditionalArgs = expectedAdditionalArgs
.Select(arg => arg.Replace("<cwd>", WorkingDirectory))
.Select(arg => arg.Replace("<cwd>", WorkingDirectory).Replace("<output>", "<output>" + Path.DirectorySeparatorChar))
.ToArray();

var msbuildPath = "<msbuildpath>";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public void MsbuildInvocationIsCorrect(string[] args, string[] expectedAdditiona
CommandDirectoryContext.PerformActionWithBasePath(WorkingDirectory, () =>
{
expectedAdditionalArgs = expectedAdditionalArgs
.Select(arg => arg.Replace("<cwd>", WorkingDirectory))
.Select(arg => arg.Replace("<cwd>", WorkingDirectory).Replace("<publishdir>", "<publishdir>" + Path.DirectorySeparatorChar))
.ToArray();

var msbuildPath = "<msbuildpath>";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void ItAddsOutputPathToMsBuildInvocation(string optionName)

var msbuildPath = "<msbuildpath>";
StoreCommand.FromArgs(args, msbuildPath)
.GetArgumentsToMSBuild().Should().Be($"{ExpectedPrefix} -property:ComposeDir={Path.GetFullPath(path)} -property:_CommandLineDefinedOutputPath=true");
.GetArgumentsToMSBuild().Should().Be($"{ExpectedPrefix} -property:ComposeDir={Path.GetFullPath(path)}{Path.DirectorySeparatorChar} -property:_CommandLineDefinedOutputPath=true");
}
}
}
Loading
0