Skip to content

Commit

Permalink
Merge pull request #28 from kudulab/workaround-27
Browse files Browse the repository at this point in the history
add workaround for issue #27
  • Loading branch information
Ewa Czechowska authored Dec 7, 2020
2 parents d745529 + 5a686d2 commit e26093c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docker_compose_driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,13 @@ func (dc DockerComposeDriver) getDCContainersNames(mergedConfig Config, projectN
stdout, stderr, exitStatus, _ := dc.ShellService.RunGetOutput(cmd, true)
if exitStatus != 0 {
cmdInfo := cmdInfoToString(cmd, stdout, stderr, exitStatus)
panic(fmt.Errorf("Unexpected exit status:\n%s", cmdInfo))
if strings.Contains(stderr, "No such container") {
// Workaround for issue #27: do not panic but print error level log message.
dc.Logger.Log("error", fmt.Sprintf("Unexpected exit status:\n#{cmdInfo}"))
return []string{}
} else {
panic(fmt.Errorf("Unexpected exit status:\n%s", cmdInfo))
}
}
stdout = strings.TrimSuffix(stdout, "\n")
if stdout == "" {
Expand Down

0 comments on commit e26093c

Please sign in to comment.