Log a verbose message when DOTNET_CLI_HOME is being used.
This commit logs a diagnostic message when the `DOTNET_CLI_HOME` variable is used. This enables users to determine where first-run-experience and global tool files are being written to. Fixes #9510.
This commit is contained in:
parent
8cffe4a578
commit
92507184bd
16 changed files with 103 additions and 0 deletions
|
@ -49,5 +49,23 @@ namespace Microsoft.DotNet.Tests
|
|||
.And
|
||||
.HaveStdErrContaining(CliFolderPathCalculator.DotnetHomeVariableName);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void GivenASpecifiedDotnetCliHomeVariableItPrintsUsageMessage()
|
||||
{
|
||||
var home = Path.Combine(TempRoot.Root, Path.GetRandomFileName());
|
||||
|
||||
new TestCommand("dotnet")
|
||||
.WithEnvironmentVariable(CliFolderPathCalculator.DotnetHomeVariableName, home)
|
||||
.ExecuteWithCapturedOutput("-d help")
|
||||
.Should()
|
||||
.Pass()
|
||||
.And
|
||||
.HaveStdOutContaining(
|
||||
string.Format(
|
||||
LocalizableStrings.DotnetCliHomeUsed,
|
||||
home,
|
||||
CliFolderPathCalculator.DotnetHomeVariableName));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue