Skip to content

Commit

Permalink
chore: make paths cross-platform for generate hook
Browse files Browse the repository at this point in the history
  • Loading branch information
robcxyz committed Dec 8, 2022
1 parent 9651600 commit b310d52
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tackle/providers/generate/hooks/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,11 @@ class GenerateHook(BaseHook, smart_union=True):
def _init_paths(self):
if isinstance(self.copy_without_render, str):
self.copy_without_render = [self.copy_without_render]

self.output = os.path.expanduser(os.path.expandvars(self.output))

# Fix paths to be cross-platform with `/` being default in config
self.output = os.path.join(*self.output.split('/'))

if 'nt' in os.name:
self.file_path_separator_ = '\\'
if not self.output.startswith('\\'):
Expand Down

0 comments on commit b310d52

Please sign in to comment.