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)
4343 return null ;
4444 }
4545
46+ if ( soughtExecutable . Exists )
47+ {
48+ return new Registration ( soughtExecutable . FullName ) ;
49+ }
50+
4651 if ( _registrationConfigurationFilePath == null
4752 || ! File . Exists ( _registrationConfigurationFilePath ) )
4853 {
4954 return null ;
5055 }
5156
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 ) ) ;
5460
5561 if ( completionTarget == null )
5662 {
You can’t perform that action at this time.
0 commit comments