mirror of https://github.com/docker/compose.git
Fix Config.find for Compose files in nested folders
Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
parent
7aa55120db
commit
3b02426236
|
@ -234,10 +234,10 @@ class ServiceConfig(namedtuple('_ServiceConfig', 'working_dir filename name conf
|
||||||
config)
|
config)
|
||||||
|
|
||||||
|
|
||||||
def find(base_dir, filenames, environment, override_dir='.'):
|
def find(base_dir, filenames, environment, override_dir=None):
|
||||||
if filenames == ['-']:
|
if filenames == ['-']:
|
||||||
return ConfigDetails(
|
return ConfigDetails(
|
||||||
os.path.abspath(override_dir),
|
os.path.abspath(override_dir) if override_dir else os.getcwd(),
|
||||||
[ConfigFile(None, yaml.safe_load(sys.stdin))],
|
[ConfigFile(None, yaml.safe_load(sys.stdin))],
|
||||||
environment
|
environment
|
||||||
)
|
)
|
||||||
|
@ -249,7 +249,7 @@ def find(base_dir, filenames, environment, override_dir='.'):
|
||||||
|
|
||||||
log.debug("Using configuration files: {}".format(",".join(filenames)))
|
log.debug("Using configuration files: {}".format(",".join(filenames)))
|
||||||
return ConfigDetails(
|
return ConfigDetails(
|
||||||
override_dir or os.path.dirname(filenames[0]),
|
override_dir if override_dir else os.path.dirname(filenames[0]),
|
||||||
[ConfigFile.from_filename(f) for f in filenames],
|
[ConfigFile.from_filename(f) for f in filenames],
|
||||||
environment
|
environment
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue