mirror of
https://github.com/ansible/awx.git
synced 2026-05-12 03:47:36 -02:30
Fix obvious logical bug with project folder pre-creation (#5155)
This commit is contained in:
committed by
Shane McDonald
parent
8dc788dbcb
commit
390e1f9a0a
@@ -2178,8 +2178,6 @@ class RunProjectUpdate(BaseTask):
|
|||||||
if not os.path.exists(settings.PROJECTS_ROOT):
|
if not os.path.exists(settings.PROJECTS_ROOT):
|
||||||
os.mkdir(settings.PROJECTS_ROOT)
|
os.mkdir(settings.PROJECTS_ROOT)
|
||||||
project_path = instance.project.get_project_path(check_if_exists=False)
|
project_path = instance.project.get_project_path(check_if_exists=False)
|
||||||
if not os.path.exists(project_path):
|
|
||||||
os.makedirs(project_path) # used as container mount
|
|
||||||
|
|
||||||
self.acquire_lock(instance)
|
self.acquire_lock(instance)
|
||||||
|
|
||||||
@@ -2192,6 +2190,9 @@ class RunProjectUpdate(BaseTask):
|
|||||||
else:
|
else:
|
||||||
self.original_branch = git_repo.active_branch
|
self.original_branch = git_repo.active_branch
|
||||||
|
|
||||||
|
if not os.path.exists(project_path):
|
||||||
|
os.makedirs(project_path) # used as container mount
|
||||||
|
|
||||||
stage_path = os.path.join(instance.get_cache_path(), 'stage')
|
stage_path = os.path.join(instance.get_cache_path(), 'stage')
|
||||||
if os.path.exists(stage_path):
|
if os.path.exists(stage_path):
|
||||||
logger.warning('{0} unexpectedly existed before update'.format(stage_path))
|
logger.warning('{0} unexpectedly existed before update'.format(stage_path))
|
||||||
|
|||||||
Reference in New Issue
Block a user