return the search matches if code is not equal to zero#3186
return the search matches if code is not equal to zero#3186priyankapinku wants to merge 1 commit into
Conversation
buzzia2001
left a comment
There was a problem hiding this comment.
Hu @priyankapinku ,
Your change makes sense, but we can't ignore stderr in this case, so in order for the PR to be approved, it must also include a warning message in case stderr contains any output
|
Hi @buzzia2001 , My understanding is that we were not passing any For example, if a user searches for a filename and one directory contains a file with restricted permissions while another directory contains a valid match, surfacing permission-denied errors alongside the search results could make the output look noisy or confusing. Previously, users would simply receive the matching file paths. Even if we pass warnings/error, those errors are not being surfaced in the IDE UI, and the behavior remains the same from the user's perspective—the search returns the matching file paths without displaying permission-related errors. |
Hi @rapra41 |
| }); | ||
|
|
||
| if (findRes.code == 0 && findRes.stdout) { | ||
| if ((findRes.code == 0 && findRes.stdout) || findRes.stdout) { |
|
@rapra41 In the screenshot you had sent me, it is definitely not very readable in the UI (as shown below). Also this is just a search tool so the user does not need all this detailed information (they can still access it in the Code for IBM i output channel if needed). If we do still think it is beneficial to show the count, I would suggest something like:
|
|
Hi @buzzia2001, Thanks! |
So, can i close this one? |





description :
When the user searches for a file in the IFS browser without specifying a path, the FindIFS function searches across all directories. However, for some directories the user does not have permission access, resulting in "Permission Denied" errors. Because of these errors, the command returns a non-zero exit code, and currently the overall result is treated as failure even when the file is successfully found in accessible directories. Due to this, valid search results are not being displayed to the user.
Changes:
I have added the condition to check for code is not equal to zero and stdres data
Checklist
console.logs I addedreference PR: #3114