File tree Expand file tree Collapse file tree 3 files changed +14
-10
lines changed Expand file tree Collapse file tree 3 files changed +14
-10
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " csharp" ,
33 "publisher" : " ms-vscode" ,
4- "version" : " 1.1.2 " ,
4+ "version" : " 1.1.3 " ,
55 "description" : " C# for Visual Studio Code (powered by OmniSharp)." ,
66 "displayName" : " C#" ,
77 "author" : " Microsoft Corporation" ,
Original file line number Diff line number Diff line change @@ -200,25 +200,29 @@ function isOnPath(command : string) : boolean {
200200 return false ;
201201 }
202202 let fileName = command ;
203- let seperatorChar = ':' ;
204203 if ( process . platform == 'win32' ) {
205204 // on Windows, add a '.exe', and the path is semi-colon seperatode
206205 fileName = fileName + ".exe" ;
207- seperatorChar = ';' ;
208206 }
209-
210- let pathSegments : string [ ] = pathValue . split ( seperatorChar ) ;
207+
208+ let pathSegments : string [ ] = pathValue . split ( path . delimiter ) ;
211209 for ( let segment of pathSegments ) {
212210 if ( segment . length === 0 || ! path . isAbsolute ( segment ) ) {
213211 continue ;
214212 }
215-
213+
216214 const segmentPath = path . join ( segment , fileName ) ;
217- if ( CoreClrDebugUtil . existsSync ( segmentPath ) ) {
218- return true ;
215+
216+ try {
217+ if ( CoreClrDebugUtil . existsSync ( segmentPath ) ) {
218+ return true ;
219+ }
220+ } catch ( err ) {
221+ // any error from existsSync can be treated as the command not being on the path
222+ continue ;
219223 }
220224 }
221-
225+
222226 return false ;
223227}
224228
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ export default class CoreClrDebugUtil
8383 fs . accessSync ( path , fs . F_OK ) ;
8484 return true ;
8585 } catch ( err ) {
86- if ( err . code === 'ENOENT' ) {
86+ if ( err . code === 'ENOENT' || err . code === 'ENOTDIR' ) {
8787 return false ;
8888 } else {
8989 throw Error ( err . code ) ;
You can’t perform that action at this time.
0 commit comments