Skip to content

Commit

Permalink
Revert "fix: fix alias path with up-level references resolve issue"
Browse files Browse the repository at this point in the history
This reverts commit 66343ac.
  • Loading branch information
cristianl committed Jun 15, 2022
1 parent b3153f4 commit 4b80798
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions hyper_click/generic_path_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,12 @@ def resolve_in_lookup_paths(self, target):
return result

def resolve_from_alias(self, alias, alias_source):
path_parts = self.str_path.split(path.sep)
path_parts = path.normpath(self.str_path).split(path.sep)

if path_parts[0] == alias:
path_parts[0] = alias_source
return self.resolve_relative_to_dir(path.normpath(path.join(*path_parts)), self.current_root)

return self.resolve_relative_to_dir(path.join(*path_parts), self.current_root)

def resolve_with_exts(self, path_name):
# matching ../index to /index.js
Expand Down

0 comments on commit 4b80798

Please sign in to comment.