Merge pull request #4032 from pypeclub/bugfix/fix_clean_install_bug

Igniter: handle missing directory
This commit is contained in:
Ondřej Samohel 2022-10-26 14:02:24 +02:00 committed by GitHub
commit eeab7fb9c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -815,6 +815,13 @@ class BootstrapRepos:
except Exception as e:
self._print(str(e), LOG_ERROR, exc_info=True)
return None
if not destination_dir.exists():
destination_dir.mkdir(parents=True)
elif not destination_dir.is_dir():
self._print(
"Destination exists but is not directory.", LOG_ERROR)
return None
try:
shutil.move(zip_file.as_posix(), destination_dir.as_posix())
except shutil.Error as e: