From 4b8079866924307573de5201630c28a95204ac60 Mon Sep 17 00:00:00 2001 From: Cristian Lorsson Date: Wed, 15 Jun 2022 11:49:50 -0300 Subject: [PATCH] Revert "fix: fix alias path with up-level references resolve issue" This reverts commit 66343acc4f91b07244e6df91161b184afef89b6f. --- hyper_click/generic_path_resolver.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hyper_click/generic_path_resolver.py b/hyper_click/generic_path_resolver.py index 38af3b3..084c04e 100644 --- a/hyper_click/generic_path_resolver.py +++ b/hyper_click/generic_path_resolver.py @@ -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