Skip to content

Commit

Permalink
fix: touch source file when template file is not given
Browse files Browse the repository at this point in the history
  • Loading branch information
xvzc committed Feb 7, 2024
1 parent ff9b0c9 commit 48007ca
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions boj/commands/add/command.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import dataclasses
import os
from pathlib import Path

from rich.console import Console

Expand Down Expand Up @@ -77,6 +78,7 @@ def execute(self, args):
dest_dir=boj_info.source_dir,
)

Path(boj_info.source_path(abs_=True)).touch()
source_code = self.text_file_repository.find(
query=boj_info.source_path(abs_=False),
cwd=config.workspace.problem_dir(args.problem_id),
Expand Down

0 comments on commit 48007ca

Please sign in to comment.