Skip to content

Commit

Permalink
bug #878 Fix parsing docker-composer files with no "version" (CountZe…
Browse files Browse the repository at this point in the history
…ro1981)

This PR was merged into the 1.x branch.

Discussion
----------

Fix parsing docker-composer files with no "version"

Fix #877

Commits
-------

7639e5f Fix parsing docker-composer files with no "version"
  • Loading branch information
nicolas-grekas committed Feb 22, 2022
2 parents 10e438f + 7639e5f commit b66b0dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Configurator/DockerComposeConfigurator.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ private function configureDockerCompose(Recipe $recipe, array $config, bool $upd
}

// Keep end in memory (check break line on previous line)
$endAt[$node] = '' !== trim($lines[$i - 1]) ? $i : $i - 1;
$endAt[$node] = !$i || '' !== trim($lines[$i - 1]) ? $i : $i - 1;
$node = $matches[1];
if (!isset($nodesLines[$node])) {
$nodesLines[$node] = [];
Expand Down

0 comments on commit b66b0dd

Please sign in to comment.