File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed
System.CommandLine.Suggest.Tests
System.CommandLine.Suggest Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ public DotnetSuggestEndToEndTests(ITestOutputHelper output)
56
56
57
57
_environmentVariables = new [ ] {
58
58
( "DOTNET_ROOT" , _dotnetHostDir . FullName ) ,
59
- ( FileSuggestionRegistration . TestDirectroyOverride , _testRoot ) } ;
59
+ ( TestDirectroyOverride : "INTERNAL_TEST_DOTNET_SUGGEST_HOME" , _testRoot ) } ;
60
60
}
61
61
62
62
public void Dispose ( )
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ namespace System.CommandLine.Suggest
10
10
{
11
11
public class FileSuggestionRegistration : ISuggestionRegistration
12
12
{
13
- public const string ResgistrationFileName = ".dotnet-suggest-registration.txt" ;
14
- public const string TestDirectroyOverride = "INTERNAL_TEST_DOTNET_SUGGEST_HOME" ;
13
+ private const string RegistrationFileName = ".dotnet-suggest-registration.txt" ;
14
+ private const string TestDirectoryOverride = "INTERNAL_TEST_DOTNET_SUGGEST_HOME" ;
15
15
private readonly string _registrationConfigurationFilePath ;
16
16
17
17
public FileSuggestionRegistration ( string registrationsConfigurationFilePath = null )
@@ -22,18 +22,16 @@ public FileSuggestionRegistration(string registrationsConfigurationFilePath = nu
22
22
return ;
23
23
}
24
24
25
- var testDirectoryOverride = GetEnvironmentVariable ( TestDirectroyOverride ) ;
25
+ var testDirectoryOverride = GetEnvironmentVariable ( TestDirectoryOverride ) ;
26
26
if ( ! string . IsNullOrWhiteSpace ( testDirectoryOverride ) )
27
27
{
28
- _registrationConfigurationFilePath = Path . Combine ( testDirectoryOverride , ResgistrationFileName ) ;
28
+ _registrationConfigurationFilePath = Path . Combine ( testDirectoryOverride , RegistrationFileName ) ;
29
29
return ;
30
30
}
31
31
32
32
var userProfile = GetFolderPath ( SpecialFolder . UserProfile ) ;
33
- if ( userProfile != null )
34
- {
35
- _registrationConfigurationFilePath = Path . Combine ( userProfile , ResgistrationFileName ) ;
36
- }
33
+
34
+ _registrationConfigurationFilePath = Path . Combine ( userProfile , RegistrationFileName ) ;
37
35
}
38
36
39
37
public Registration FindRegistration ( FileInfo soughtExecutable )
You can’t perform that action at this time.
0 commit comments