File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
src/System.CommandLine.Suggest Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -43,14 +43,20 @@ public Registration FindRegistration(FileInfo soughtExecutable)
43
43
return null ;
44
44
}
45
45
46
+ if ( soughtExecutable . Exists )
47
+ {
48
+ return new Registration ( soughtExecutable . FullName ) ;
49
+ }
50
+
46
51
if ( _registrationConfigurationFilePath == null
47
52
|| ! File . Exists ( _registrationConfigurationFilePath ) )
48
53
{
49
54
return null ;
50
55
}
51
56
52
- string completionTarget = File . ReadAllLines ( _registrationConfigurationFilePath ) . LastOrDefault ( line =>
53
- line . StartsWith ( soughtExecutable . FullName , StringComparison . OrdinalIgnoreCase ) ) ;
57
+ var completionTarget =
58
+ File . ReadAllLines ( _registrationConfigurationFilePath ) . LastOrDefault ( line =>
59
+ line . StartsWith ( soughtExecutable . FullName , StringComparison . OrdinalIgnoreCase ) ) ;
54
60
55
61
if ( completionTarget == null )
56
62
{
You can’t perform that action at this time.
0 commit comments