Don't abort instantly, keep searching#13243
Conversation
sean-mcmanus
left a comment
There was a problem hiding this comment.
Shouldn't it call return undefined; at the very end of the function if it doesn't find anything?
It already does return It would have done that before too when it didn't find anything. This just stops it from uselessly short-circuiting when it gets an exception from |
sean-mcmanus
left a comment
There was a problem hiding this comment.
Okay, I wasn't sure what the TypeScript behavior was or if would generate a warning.
While TypeScript does return undefined automatically in the absence of |
|
@bobbrow Yeah, I'm not sure what the preferable TypeScript style is, but it would seem like if we wanted a style that prefers always returning something then it would be good to enforce that via an eslint rule (I haven't checked if one exists or not, but I thought it did a long time ago). |
It should not abort instantly when looking for powershell or pwsh
fixes #13137