Skip to content

Commit

Permalink
Add classmethod to check for shell pathed keys
Browse files Browse the repository at this point in the history
Signed-off-by: amorphousWaste <20346603+amorphousWaste@users.noreply.github.com>
  • Loading branch information
amorphousWaste authored and Jawabiscuit committed Sep 15, 2023
1 parent 744e8f9 commit 7aaaecb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/rez/rex.py
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,16 @@ def escape_string(self, value, is_path=False):
def _is_pathed_key(cls, key):
return any(fnmatch(key, x) for x in config.pathed_env_vars)

@classmethod
def _is_shell_pathed_key(cls, key):
shell_name = cls.name if hasattr(cls, 'name') else ''
if shell_name not in config.shell_pathed_env_vars:
return False

return any(
fnmatch(key, x) for x in config.shell_pathed_env_vars[shell_name]
)

def normalize_path(self, path):
"""Normalize a path.
Expand Down

0 comments on commit 7aaaecb

Please sign in to comment.