Skip to content

Commit

Permalink
One more used_tmpdir tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
j4b6ski committed Dec 8, 2024
1 parent e430e97 commit 801f2e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sinol_make/commands/init/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ 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

is_url = template.startswith(('http://', 'https://', 'ssh://', 'git@', 'file://'))
Expand Down Expand Up @@ -106,6 +105,7 @@ def run(self, args: argparse.Namespace):
util.exit_with_error(f"Destination {destination} already exists. "
f"Provide a different task id or directory name, "
f"or use the --force flag to overwrite.")
self.used_tmpdir = tempfile.TemporaryDirectory()
try:
self.template_dir = self.download_template(args.template)

Expand Down

0 comments on commit 801f2e1

Please sign in to comment.