Skip to content

Commit

Permalink
Revert "Be more strict about resolving paths maybe?"
Browse files Browse the repository at this point in the history
This reverts commit ce6f645.
  • Loading branch information
JCGoran committed Feb 19, 2024
1 parent db9054e commit 5ff006d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/language/code_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class CodeGenerator(
"""

def __new__(cls, base_dir, clang_format=None):
this_dir = Path(__file__).parent.resolve(strict=True)
this_dir = Path(__file__).parent.resolve()
jinja_templates_dir = this_dir / "templates"
py_files = [Path(p).relative_to(this_dir) for p in this_dir.glob("*.py")]
yaml_files = [Path(p).relative_to(this_dir) for p in this_dir.glob("*.yaml")]
Expand Down Expand Up @@ -358,9 +358,9 @@ def parse_args(args=None):

# destination directory to render templates
args.base_dir = (
Path(args.base_dir).resolve(strict=True)
Path(args.base_dir).resolve()
if args.base_dir
else Path(__file__).resolve(strict=True).parent.parent
else Path(__file__).resolve().parent.parent
)
return args

Expand Down

0 comments on commit 5ff006d

Please sign in to comment.