Make --no-build imply --no-restore for run command.
This commit makes the `--no-build` option for the run command automatically imply `--no-restore`. Fixes issue #7472.
This commit is contained in:
parent
ea85555a97
commit
4f7c76b4e4
16 changed files with 47 additions and 96 deletions
|
@ -75,6 +75,25 @@ namespace Microsoft.DotNet.Cli.Run.Tests
|
|||
.And.HaveStdOutContaining("This string came from the test library!");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ItDoesNotImplicitlyBuildAProjectWhenRunningWithTheNoBuildOption()
|
||||
{
|
||||
var testAppName = "MSBuildTestApp";
|
||||
var testInstance = TestAssets.Get(testAppName)
|
||||
.CreateInstance()
|
||||
.WithSourceFiles();
|
||||
|
||||
var result = new RunCommand()
|
||||
.WithWorkingDirectory(testInstance.Root.FullName)
|
||||
.ExecuteWithCapturedOutput("--no-build -v:m");
|
||||
|
||||
result.Should().Fail();
|
||||
if (!DotnetUnderTest.IsLocalized())
|
||||
{
|
||||
result.Should().NotHaveStdOutContaining("Restore");
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ItDoesNotImplicitlyRestoreAProjectWhenRunningWithTheNoRestoreOption()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue