Skip to content

Commit

Permalink
add workaround for issue #27
Browse files Browse the repository at this point in the history
  • Loading branch information
xmik committed Dec 6, 2020
1 parent d745529 commit 5a686d2
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 5a686d2

Please sign in to comment.