Skip to content

Commit

Permalink
Fix init for complex repos
Browse files Browse the repository at this point in the history
  • Loading branch information
Andriiklymiuk committed Feb 19, 2023
1 parent df9395c commit 822b168
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func CloneServices(services []utils.Service) {
}
err = utils.RunServiceCmd(
service.ServiceName,
"git pull",
"corgi pull --silent",
service.Path,
)
if err != nil {
Expand All @@ -180,6 +180,24 @@ func CloneServices(services []utils.Service) {
}
}
}
corgiComposeExists, err := utils.CheckIfFileExistsInDirectory(
service.Path,
"corgi-compose.yml",
)
if err != nil {
fmt.Println(err)
}
if corgiComposeExists {
err = utils.RunServiceCmd(
service.ServiceName,
"corgi init --silent",
service.Path,
)
if err != nil {
fmt.Printf(`output error: %s, in path %s with corgi init --silent %s
`, err, service.Path, service.Branch)
}
}
}
}

Expand Down

0 comments on commit 822b168

Please sign in to comment.