Skip to content

Commit

Permalink
Fix compose upArgs
Browse files Browse the repository at this point in the history
  • Loading branch information
bkneis authored and pascalbreuninger committed Jan 21, 2025
1 parent 55e219d commit 52664d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/devcontainer/compose.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,9 @@ func (r *runner) runDockerCompose(

// onlyRunServices appends the services defined in .devcontainer.json runServices to the upArgs
func (r *runner) onlyRunServices(upArgs []string, parsedConfig *config.SubstitutedConfig) []string {
// Always run the main devcontainer
upArgs = append(upArgs, parsedConfig.Config.Service)
if len(parsedConfig.Config.RunServices) > 0 {
// Run the main devcontainer
upArgs = append(upArgs, parsedConfig.Config.Service)
// Run the services defined in .devcontainer.json runServices
for _, service := range parsedConfig.Config.RunServices {
if service == parsedConfig.Config.Service {
Expand Down

0 comments on commit 52664d0

Please sign in to comment.