mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fail gracefully when build path is not found.
This commit is contained in:
parent
ca7defeee5
commit
d5b82d67b8
1 changed files with 2 additions and 0 deletions
|
@ -259,6 +259,8 @@ class ImageManager(DockerBaseClass):
|
|||
if not image or self.force:
|
||||
if self.path:
|
||||
# Build the image
|
||||
if not os.path.isdir(self.path):
|
||||
self.fail("Requested build path %s could not be found or you do not have access." % self.path)
|
||||
image_name = self.name
|
||||
if self.tag:
|
||||
image_name = "%s:%s" % (self.name, self.tag)
|
||||
|
|
Loading…
Reference in a new issue