Skip to content

Commit b66b0dd

Browse files
bug #878 Fix parsing docker-composer files with no "version" (CountZero1981)
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"
2 parents 10e438f + 7639e5f commit b66b0dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Configurator/DockerComposeConfigurator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ private function configureDockerCompose(Recipe $recipe, array $config, bool $upd
259259
}
260260

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

0 commit comments

Comments
 (0)