mirror of
https://github.com/docker/compose.git
synced 2026-08-04 14:47:40 +00:00
Merge pull request #4713 from shin-/4710-project_dir_fix
Fix Config.find for Compose files in nested folders
This commit is contained in:
commit
2b61afb45f
1 changed files with 3 additions and 3 deletions
|
|
@ -234,10 +234,10 @@ class ServiceConfig(namedtuple('_ServiceConfig', 'working_dir filename name conf
|
|||
config)
|
||||
|
||||
|
||||
def find(base_dir, filenames, environment, override_dir='.'):
|
||||
def find(base_dir, filenames, environment, override_dir=None):
|
||||
if filenames == ['-']:
|
||||
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))],
|
||||
environment
|
||||
)
|
||||
|
|
@ -249,7 +249,7 @@ def find(base_dir, filenames, environment, override_dir='.'):
|
|||
|
||||
log.debug("Using configuration files: {}".format(",".join(filenames)))
|
||||
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],
|
||||
environment
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue