Skip to content

Commit 7639e5f

Browse files
CountZero1981nicolas-grekas
authored andcommitted
Fix parsing docker-composer files with no "version"
1 parent 10e438f commit 7639e5f

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)