mirror of https://github.com/docker/compose.git
Use absolute paths
A circular reference bug occurs when there is a difference in the paths of the file specified in the extends. So one time it is relative, second time is absolute thus allowing a further circular reference to occur. By using absolute paths we can be sure that the service filename check is correct. Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
This commit is contained in:
parent
254bc4908c
commit
bd7fcd1123
|
@ -140,8 +140,11 @@ def make_service_dict(name, service_dict, working_dir=None):
|
|||
|
||||
class ServiceLoader(object):
|
||||
def __init__(self, working_dir, filename=None, already_seen=None):
|
||||
self.working_dir = working_dir
|
||||
self.filename = filename
|
||||
self.working_dir = os.path.abspath(working_dir)
|
||||
if filename:
|
||||
self.filename = os.path.abspath(filename)
|
||||
else:
|
||||
self.filename = filename
|
||||
self.already_seen = already_seen or []
|
||||
|
||||
def make_service_dict(self, name, service_dict):
|
||||
|
|
Loading…
Reference in New Issue