Fixed the case where a service has no external file to import (#47)

This commit is contained in:
Grégory PLANCHAT 2020-07-23 21:38:18 +02:00 committed by GitHub
parent bf8d4b200f
commit ead07e8fa9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -236,12 +236,14 @@ function makeVerticesAndEdges(Graph $graph, array $services, array $volumes, arr
addService($graph, $service);
if (isset($definition['extends'])) {
if (isset($definition['extends']['file'])) {
$configuration = readConfiguration(dirname($path) . DIRECTORY_SEPARATOR . $definition['extends']['file']);
$extendedServices = fetchServices($configuration);
$extendedVolumes = fetchVolumes($configuration);
$extendedNetworks = fetchVolumes($configuration);
$graph = makeVerticesAndEdges($graph, $extendedServices, $extendedVolumes, $extendedNetworks, dirname($path).DIRECTORY_SEPARATOR.$definition['extends']['file'], $flags);
}
addRelation(
addService($graph, $definition['extends']['service']),