Skip to content

Commit

Permalink
init comp: ensure directory exists before writing file
Browse files Browse the repository at this point in the history
  • Loading branch information
jesteria committed Feb 8, 2023
1 parent 6b05815 commit 8a0f967
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/fate/cli/command/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ def __call__(self, args, parser):

if do_install == 'y':
try:
completions_path.parent.mkdir(parents=True,
exist_ok=True)
completions_path.write_text(contents)
except OSError:
status = EndStatus.failed
Expand Down

0 comments on commit 8a0f967

Please sign in to comment.