Skip to content

Commit

Permalink
fix: dockerComposeWorkingDirectory is used when looking for services …
Browse files Browse the repository at this point in the history
…names, for older Docker Compose versions

Fixes #310
  • Loading branch information
augi committed Jul 31, 2021
1 parent 085c0a7 commit 5f9254a
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,11 @@ class ComposeExecutor {
}

Iterable<File> getStandardComposeFiles() {
File searchDirectory = fileOps.file(settings.dockerComposeWorkingDirectory) ?: layout.projectDirectory.getAsFile()
def res = []
def f = findInParentDirectories('docker-compose.yml', layout.projectDirectory.getAsFile())
def f = findInParentDirectories('docker-compose.yml', searchDirectory)
if (f != null) res.add(f)
f = findInParentDirectories('docker-compose.override.yml', layout.projectDirectory.getAsFile())
f = findInParentDirectories('docker-compose.override.yml', searchDirectory)
if (f != null) res.add(f)
res
}
Expand Down

0 comments on commit 5f9254a

Please sign in to comment.