Fix-72650 Shell paths should be validated before launched to prevent ambiguous errors#72784
Fix-72650 Shell paths should be validated before launched to prevent ambiguous errors#72784Tyriar merged 7 commits intomicrosoft:masterfrom
Conversation
…ant error message with negative exit code
Tyriar
left a comment
There was a problem hiding this comment.
Thanks for looking into this, got some comments below
|
@Tyriar , I have changed as per your comments , Please check and review the same :) PS : I felt the try catch was no more required as the catch block was meant to catch only file not found exceptions. |
Tyriar
left a comment
There was a problem hiding this comment.
I think just to be safe we should be checking if (this._ptyProcess) instead of using !, otherwise null pointer exceptions could slip in.
|
@Tyriar , Changes are done as per your reviews . PS: The build is still failing but not sure exactly why and is it because of these changes . |
|
Wow my exitCodeMessage code really became a mess over time 😅, I cleaned that up a bit, also the path.basename was preventing the stat from working properly before. |
Tyriar
left a comment
There was a problem hiding this comment.
Thanks @skprabhanjan, provided tests pass this time I'll merge this in for May soon 👍
|
@Tyriar, Thanks for the cleanup and few code changes related to path.basename :) |
@Tyriar , Added the changes to handle file path check to resolve #72650 .
For the async problem that you had raised , I have used
fs.existsSync( https://nodejs.org/api/fs.html#fs_fs_existssync_path)Please review this and let me know if anything is not rite or needs to be changed , Thanks :)