File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,22 +66,23 @@ static bool TryResolveForOs(
6666 var basePath = Environment . GetEnvironmentVariable ( os . EnvironmentVariable ) ;
6767 if ( basePath is not null )
6868 {
69- if ( basePath . EndsWith ( os . ExeName ) && File . Exists ( basePath ) )
69+ if ( basePath . EndsWith ( os . ExeName ) &&
70+ File . Exists ( basePath ) )
7071 {
72+ path = basePath ;
73+ return true ;
7174 }
72- else if ( Directory . Exists ( basePath ) )
73- {
74- basePath = Path . Combine ( basePath , os . ExeName ) ;
75- }
76- else
77- {
78- path = null ;
79- return false ;
80- }
81- if ( WildcardFileFinder . TryFind ( basePath , out path ) )
75+
76+ if ( Directory . Exists ( basePath ) )
8277 {
83- return true ;
78+ path = Path . Combine ( basePath , os . ExeName ) ;
79+ if ( File . Exists ( path ) )
80+ {
81+ return true ;
82+ }
8483 }
84+
85+ throw new ( $ "Could not find exe defined by { os . EnvironmentVariable } . Path: { basePath } ") ;
8586 }
8687 }
8788
You can’t perform that action at this time.
0 commit comments