Skip to content

Commit c8a5fa3

Browse files
committed
fix: Don't overwrite compose.yaml on rofl init
1 parent df04d4e commit c8a5fa3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cmd/rofl/mgmt.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -710,9 +710,9 @@ func replaceArtifacts(manifest *buildRofl.Manifest, newArtifacts *buildRofl.Arti
710710
return changes, nil
711711
}
712712

713-
// detectAndCreateComposeFile detects the existing compose.yaml-like file and returns its filename. Otherwise, creates an empty default compose.yaml.
713+
// detectOrCreateComposeFile detects the existing compose.yaml-like file and returns its filename. If it doesn't exist, it creates compose.yaml and populates it.
714714
func detectOrCreateComposeFile() string {
715-
for _, filename := range []string{"rofl-compose.yaml", "rofl-compose.yml", "docker-compose.yaml", "docker-compose.yml", "compose.yml"} {
715+
for _, filename := range []string{"rofl-compose.yaml", "rofl-compose.yml", "docker-compose.yaml", "docker-compose.yml", "compose.yml", "compose.yaml"} {
716716
if _, err := os.Stat(filename); err == nil {
717717
return filename
718718
}

0 commit comments

Comments
 (0)