Skip to content

Commit

Permalink
Test quick fix #1
Browse files Browse the repository at this point in the history
  • Loading branch information
j4b6ski committed Dec 8, 2024
1 parent e1474df commit 89e1fc1
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/sinol_make/commands/init/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ def configure_subparser(self, subparser: argparse.ArgumentParser):
parser.add_argument('-v', '--verbose', action='store_true')
return parser

def download_template(self):
template = self.template[0]
subdir = self.template[1] if len(self.template) > 1 else ''
def download_template(self, template_paths = [DEFAULT_TEMPLATE, DEFAULT_SUBDIR]):
template = template_paths[0]
subdir = template_paths[1] if len(template_paths) > 1 else ''

self.used_tmpdir = tempfile.TemporaryDirectory()
tmp_dir = self.used_tmpdir.name
Expand Down Expand Up @@ -95,7 +95,6 @@ def update_task_id(self):
def run(self, args: argparse.Namespace):
self.task_id = args.task_id
self.force = args.force
self.template = args.template
self.verbose = args.verbose
destination = args.output or self.task_id
if not os.path.isabs(destination):
Expand All @@ -108,7 +107,7 @@ def run(self, args: argparse.Namespace):
f"Provide a different task id or directory name, "
f"or use the --force flag to overwrite.")
try:
self.template_dir = self.download_template()
self.template_dir = self.download_template(args.template)

os.chdir(destination)

Expand Down

0 comments on commit 89e1fc1

Please sign in to comment.