integration-cli-on-swarm: print detailed error

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 3fd386fed1f2678c413a07d5023146dfe1fd17ab
Component: engine
This commit is contained in:
Akihiro Suda
2017-07-28 05:43:52 +00:00
parent b022420c94
commit 93dcd2db6d

View File

@ -43,7 +43,7 @@ func deployStack(unusedCli *client.Client, stackName, composeFilePath string) er
func hasStack(unusedCli *client.Client, stackName string) bool {
// FIXME: eliminate os/exec (but stack is implemented in CLI ...)
out, err := exec.Command("docker", "stack", "ls").Output()
out, err := exec.Command("docker", "stack", "ls").CombinedOutput()
if err != nil {
panic(fmt.Errorf("`docker stack ls` failed with: %s", string(out)))
}