Skip to content

Commit

Permalink
rzshell_which.py: Ignore FAKE and INNER entries (#4412)
Browse files Browse the repository at this point in the history
Co-authored-by: Riccardo Schirone <[email protected]>
  • Loading branch information
kazarmy and ret2libc authored Apr 3, 2024
1 parent 3d93397 commit 0f29d00
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions librz/core/cmd_descs/rzshell_which.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@
import subprocess

import yaml
from cmd_descs_util import CD_TYPE_OLDINPUT, compute_cname, get_handler_cname
from cmd_descs_util import (
CD_TYPE_OLDINPUT,
CD_TYPE_FAKE,
CD_TYPE_INNER,
compute_cname,
get_handler_cname,
)


def get_yaml_files(basedir):
Expand All @@ -29,7 +35,8 @@ def find_entry(commands, rzcommand):
return None

if c["name"] == rzcommand:
return c
if c.get("type") not in [CD_TYPE_FAKE, CD_TYPE_INNER]:
return c

return None

Expand Down

0 comments on commit 0f29d00

Please sign in to comment.