Addressed feedback
This commit is contained in:
parent
cc65ddfa28
commit
c6de61b520
|
|
@ -81,7 +81,7 @@ namespace Microsoft.AspNetCore.Server.Testing
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool PublishApplicationBeforeDeployment { get; set; }
|
public bool PublishApplicationBeforeDeployment { get; set; }
|
||||||
|
|
||||||
public bool DeletePublishedApplicationOnDispose { get; set; } = true;
|
public bool PreservePublishedApplicationForDebugging { get; set; } = false;
|
||||||
|
|
||||||
public ApplicationType ApplicationType { get; set; }
|
public ApplicationType ApplicationType { get; set; }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,13 @@ namespace Microsoft.AspNetCore.Server.Testing
|
||||||
|
|
||||||
protected void CleanPublishedOutput()
|
protected void CleanPublishedOutput()
|
||||||
{
|
{
|
||||||
if (DeploymentParameters.DeletePublishedApplicationOnDispose)
|
if (DeploymentParameters.PreservePublishedApplicationForDebugging)
|
||||||
|
{
|
||||||
|
Logger.LogWarning(
|
||||||
|
"Skipping deleting the locally published folder as property " +
|
||||||
|
$"'{nameof(DeploymentParameters.PreservePublishedApplicationForDebugging)}' is set to 'true'.");
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
@ -94,12 +100,6 @@ namespace Microsoft.AspNetCore.Server.Testing
|
||||||
Logger.LogWarning($"Failed to delete directory : {exception.Message}");
|
Logger.LogWarning($"Failed to delete directory : {exception.Message}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
Logger.LogWarning(
|
|
||||||
"Skipping deleting the locally published folder as property " +
|
|
||||||
$"'{nameof(DeploymentParameters.DeletePublishedApplicationOnDispose)}' is set to 'false'.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void ShutDownIfAnyHostProcess(Process hostProcess)
|
protected void ShutDownIfAnyHostProcess(Process hostProcess)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue